src/corelib/kernel/qeventdispatcher_win.cpp
changeset 18 2f34d5167611
parent 3 41300fa6a67c
child 30 5dc02b23752f
--- a/src/corelib/kernel/qeventdispatcher_win.cpp	Tue Feb 02 00:43:10 2010 +0200
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp	Fri Apr 16 15:50:13 2010 +0300
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 **
@@ -68,6 +68,14 @@
 #  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,
@@ -502,8 +510,8 @@
                 MSG *msg = (MSG *) lp;
                 if (localSerialNumber != d->lastSerialNumber
                     // if this message IS the one that triggers sendPostedEvents(), no need to post it again
-                    && msg->hwnd != d->internalHwnd
-                    && msg->message != WM_QT_SENDPOSTEDEVENTS) {
+                    && (msg->hwnd != d->internalHwnd
+                        || msg->message != WM_QT_SENDPOSTEDEVENTS)) {
                     PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS, 0, 0);
                 }
             }
@@ -714,6 +722,9 @@
                             && 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;