summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qdnd_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qdnd_x11.cpp')
-rw-r--r--src/gui/kernel/qdnd_x11.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/kernel/qdnd_x11.cpp b/src/gui/kernel/qdnd_x11.cpp
index 2b14743..d2050d1 100644
--- a/src/gui/kernel/qdnd_x11.cpp
+++ b/src/gui/kernel/qdnd_x11.cpp
@@ -42,6 +42,7 @@
#include "qplatformdefs.h"
#include "qapplication.h"
+#include "qabstracteventdispatcher.h"
#ifndef QT_NO_DRAGANDDROP
@@ -1967,7 +1968,10 @@ Qt::DropAction QDragManager::drag(QDrag * o)
timer.start();
do {
XEvent event;
- if (XCheckTypedEvent(X11->display, ClientMessage, &event))
+ // Pass the event through the event dispatcher filter so that applications
+ // which install an event filter on the dispatcher get to handle it first.
+ if (XCheckTypedEvent(X11->display, ClientMessage, &event) &&
+ !QAbstractEventDispatcher::instance()->filterEvent(&event))
qApp->x11ProcessEvent(&event);
// sleep 50 ms, so we don't use up CPU cycles all the time.