diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-02-11 14:24:48 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-02-12 12:34:44 (GMT) |
commit | 49228260b8a70a8177c5eb89b73ed6f3a07b7cc9 (patch) | |
tree | c1fd3f1b1ace30d4db11809ec7890d01d2bbe63f | |
parent | 43233652e753ffa2b97a8b6d56ae53bb02cbad6b (diff) | |
download | Qt-49228260b8a70a8177c5eb89b73ed6f3a07b7cc9.zip Qt-49228260b8a70a8177c5eb89b73ed6f3a07b7cc9.tar.gz Qt-49228260b8a70a8177c5eb89b73ed6f3a07b7cc9.tar.bz2 |
Ignore touch and gesture events when excluding input events
When asked to exclude input events when processing events in the event
dispatcher we should also exclude touch and gesture events on Windows and Mac.
Reviewed-by: Bradley T. Hughes
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_win.cpp | 11 | ||||
-rw-r--r-- | src/gui/kernel/qeventdispatcher_mac.mm | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index cbc87f3..93becc8 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -68,6 +68,14 @@ extern uint qGlobalPostedEventsCount(); # define QS_RAWINPUT 0x0400 #endif +#ifndef WM_TOUCH +# define WM_TOUCH 0x0240 +#endif +#ifndef WM_GESTURE +# define WM_GESTURE 0x0119 +# define WM_GESTURENOTIFY 0x011A +#endif + enum { WM_QT_SOCKETNOTIFIER = WM_USER, WM_QT_SENDPOSTEDEVENTS = WM_USER + 1, @@ -714,6 +722,9 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags) && msg.message <= WM_MOUSELAST) || msg.message == WM_MOUSEWHEEL || msg.message == WM_MOUSEHWHEEL + || msg.message == WM_TOUCH + || msg.message == WM_GESTURE + || msg.message == WM_GESTURENOTIFY || msg.message == WM_CLOSE)) { // queue user input events for later processing haveMessage = false; diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm index c7c7caf..0b3d62f 100644 --- a/src/gui/kernel/qeventdispatcher_mac.mm +++ b/src/gui/kernel/qeventdispatcher_mac.mm @@ -492,6 +492,14 @@ static bool IsMouseOrKeyEvent( NSEvent* event ) case NSOtherMouseDown: case NSOtherMouseUp: case NSOtherMouseDragged: +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 + case NSEventTypeGesture: // touch events + case NSEventTypeMagnify: + case NSEventTypeSwipe: + case NSEventTypeRotate: + case NSEventTypeBeginGesture: + case NSEventTypeEndGesture: +#endif result = true; break; |