summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddatadevice_p.h
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-08-21 13:44:05 +0200
committerJohan Helsing <johan.helsing@qt.io>2019-08-29 08:26:01 +0000
commit1cce394099bd83261a0fe3bb73acd5c4bd8a749a (patch)
tree88fcc8e2068ffbb23b121a5c19b82c19eda65c0a /src/client/qwaylanddatadevice_p.h
parent5400af8850a7a73a19443839fbd0c8f3d45b091b (diff)
Client: Don't freeze in QDrag::exec if there was no drag focus
af00b801 fixed a crash when starting a drag without a valid focus, but there is still a problem, because QDrag::exec will never return because it's waiting indefinitely in an event loop. - QWaylandDataDevice::startDrag can now fail by returning false. - When starting a drag fails, we cancel the drag through QWaylandDrag::cancelDrag wrapped in invokeMethod. - Also, don't unnecessarily create a data_source if we cannot start a drag. [ChangeLog][QPA plugin] Fixed a freeze that happened when starting a drag-and-drop operation without a valid source surface. Change-Id: Iea19b0c92c196a44d1274a966bee4ff519632d34 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/client/qwaylanddatadevice_p.h')
-rw-r--r--src/client/qwaylanddatadevice_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/qwaylanddatadevice_p.h b/src/client/qwaylanddatadevice_p.h
index 0a7f42538..16c3ad28e 100644
--- a/src/client/qwaylanddatadevice_p.h
+++ b/src/client/qwaylanddatadevice_p.h
@@ -89,7 +89,7 @@ public:
#if QT_CONFIG(draganddrop)
QWaylandDataOffer *dragOffer() const;
- void startDrag(QMimeData *mimeData, QWaylandWindow *icon);
+ bool startDrag(QMimeData *mimeData, QWaylandWindow *icon);
void cancelDrag();
#endif