summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-08-19 14:14:01 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-20 13:05:18 (GMT)
commitd86e651a6eb2382365295ec1b2b022b9f0a08f92 (patch)
tree4f1ac3e8cce50404501231a66ffb062dcecb2b1d /src/corelib/kernel
parentf18b03d543f66981e455b013df75fb0bcd2611cb (diff)
downloadQt-d86e651a6eb2382365295ec1b2b022b9f0a08f92.zip
Qt-d86e651a6eb2382365295ec1b2b022b9f0a08f92.tar.gz
Qt-d86e651a6eb2382365295ec1b2b022b9f0a08f92.tar.bz2
Use correct mask constant in the Windows event dispatcher.
Mask out QS_TOUCH, QS_POINTER when running a VS2012-compiled binary on pre-Windows 8 systems. Task-number: QTBUG-32257 Task-number: QTBUG-28513 Task-number: QTBUG-29097 Task-number: QTBUG-29435 Task-number: QTBUG-18852 Change-Id: I33ce3a659a234cb04d3b5ae9d668d193d681be7f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> (cherry picked from qtbase/54f1d7e2e48b896755aa930ee7e4ecacf51bf977)
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index c05f90c..a1809d1 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -505,6 +505,18 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
return DefWindowProc(hwnd, message, wp, lp);
}
+static inline UINT inputTimerMask()
+{
+ UINT result = QS_TIMER | QS_INPUT | QS_RAWINPUT;
+ // QTBUG 28513, QTBUG-29097, QTBUG-29435: QS_TOUCH, QS_POINTER became part of
+ // QS_INPUT in Windows Kit 8. They should not be used when running on pre-Windows 8.
+#if defined(_MSC_VER) && _MSC_VER >= 1700
+ if (QSysInfo::WindowsVersion < QSysInfo::WV_WINDOWS8)
+ result &= ~(QS_TOUCH | QS_POINTER);
+#endif // _MSC_VER >= 1700
+ return result;
+}
+
LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
{
if (wp == PM_REMOVE) {
@@ -514,7 +526,8 @@ LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
MSG *msg = (MSG *) lp;
QEventDispatcherWin32Private *d = q->d_func();
int localSerialNumber = d->serialNumber;
- if (HIWORD(GetQueueStatus(QS_TIMER | QS_INPUT | QS_RAWINPUT)) == 0) {
+ static const UINT mask = inputTimerMask();
+ if (HIWORD(GetQueueStatus(mask)) == 0) {
// no more input or timer events in the message queue, we can allow posted events to be sent normally now
if (d->sendPostedEventsWindowsTimerId != 0) {
// stop the timer to send posted events, since we now allow the WM_QT_SENDPOSTEDEVENTS message