From 69ada23a75bb51b4efc90c6128cce22d5ee6a779 Mon Sep 17 00:00:00 2001 From: John Stanley Date: Tue, 17 Jan 2012 20:04:55 -0500 Subject: When doing mouse move compression, pass non-MotionNotify events to installed event dispatcher event filters Change-Id: Ia71f23458b9a6bc728f3e05592f530e317ae453c Reviewed-by: Bradley T. Hughes --- src/gui/kernel/qapplication_x11.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 256db7d..4d642a9 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -4234,7 +4234,10 @@ bool QETWidget::translateMouseEvent(const XEvent *event) && (nextEvent.xclient.message_type == ATOM(_QT_SCROLL_DONE) || (nextEvent.xclient.message_type == ATOM(WM_PROTOCOLS) && (Atom)nextEvent.xclient.data.l[0] == ATOM(_NET_WM_SYNC_REQUEST))))) { - qApp->x11ProcessEvent(&nextEvent); + // 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 (!QAbstractEventDispatcher::instance()->filterEvent(&nextEvent)) + qApp->x11ProcessEvent(&nextEvent); continue; } else if (nextEvent.type != MotionNotify || nextEvent.xmotion.window != event->xmotion.window || -- cgit v0.12