File pass-compressed-mouse-events-through-filters.diff of Package libqt4.1378
commit 69ada23a75bb51b4efc90c6128cce22d5ee6a779
Author: John Stanley <jpsinthemix@verizon.net>
Date: Tue Jan 17 20:04:55 2012 -0500
When doing mouse move compression, pass non-MotionNotify events to installed event dispatcher event filters
Change-Id: Ia71f23458b9a6bc728f3e05592f530e317ae453c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
--- src/gui/kernel/qapplication_x11.cpp
+++ 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 ||