summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-08-20 06:44:03 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-08-20 06:44:03 (GMT)
commit24f8cf971b330214f79757facc82d72981b7789e (patch)
treeee760f076d827c56e209daaa153aceec1fab63fa
parente49f978b16f38bf51eb631e5bc04e46f4d8bdb9d (diff)
downloadQt-24f8cf971b330214f79757facc82d72981b7789e.zip
Qt-24f8cf971b330214f79757facc82d72981b7789e.tar.gz
Qt-24f8cf971b330214f79757facc82d72981b7789e.tar.bz2
XdndLeave events have incorrect source id
When sending XdndLeave events, we should use the effectiveWinId() of the drag source (just like we do when sending XdndEnter and XdndPosition events). Task-number: 255559
-rw-r--r--src/gui/kernel/qdnd_x11.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qdnd_x11.cpp b/src/gui/kernel/qdnd_x11.cpp
index a4042c1..8f92fea 100644
--- a/src/gui/kernel/qdnd_x11.cpp
+++ b/src/gui/kernel/qdnd_x11.cpp
@@ -1073,12 +1073,14 @@ void qt_xdnd_send_leave()
if (!qt_xdnd_current_target)
return;
+ QDragManager *manager = QDragManager::self();
+
XClientMessageEvent leave;
leave.type = ClientMessage;
leave.window = qt_xdnd_current_target;
leave.format = 32;
leave.message_type = ATOM(XdndLeave);
- leave.data.l[0] = qt_xdnd_dragsource_xid;
+ leave.data.l[0] = manager->dragPrivate()->source->effectiveWinId();
leave.data.l[1] = 0; // flags
leave.data.l[2] = 0; // x, y
leave.data.l[3] = 0; // w, h
@@ -1094,8 +1096,8 @@ void qt_xdnd_send_leave()
else
XSendEvent(X11->display, qt_xdnd_current_proxy_target, False,
NoEventMask, (XEvent*)&leave);
+
// reset the drag manager state
- QDragManager *manager = QDragManager::self();
manager->willDrop = false;
if (global_accepted_action != Qt::IgnoreAction)
manager->emitActionChanged(Qt::IgnoreAction);