diff options
author | John Stanley <jpsinthemix@verizon.net> | 2012-01-18 01:04:59 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-10 15:11:54 (GMT) |
commit | 1095252559a937efcaaf012d8dfbb4e13c4fd6b5 (patch) | |
tree | b595f56246fed2c8768d9149429b801e775c789a /src/gui/kernel/qdnd_x11.cpp | |
parent | 7252bda693ab99cb2e8013a1c7a051ae17ba7956 (diff) | |
download | Qt-1095252559a937efcaaf012d8dfbb4e13c4fd6b5.zip Qt-1095252559a937efcaaf012d8dfbb4e13c4fd6b5.tar.gz Qt-1095252559a937efcaaf012d8dfbb4e13c4fd6b5.tar.bz2 |
Pass events to installed event dispatcher event filters before passing them to x11ProcessEvent()
Change-Id: If551c732b520b0105a3d4578db1b039c1b5d49fd
Pass events to eventFilter first
Change-Id: If551c732b520b0105a3d4578db1b039c1b5d49fd
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Diffstat (limited to 'src/gui/kernel/qdnd_x11.cpp')
-rw-r--r-- | src/gui/kernel/qdnd_x11.cpp | 6 |
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. |