summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-07-02 13:30:05 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-02 16:33:08 +0200
commit671d6075127bf7cb2d6c1c7ae539c266a320604e (patch)
tree3bca1dcd3875bca8da916daf7b865b836b847b35
parent323164f5fbfbd56c1a0c2d856e440a87b0ed73c7 (diff)
Windows: Fix detection of synthesized mouse events for MSVC / 64bit.
For some reason, the enumeration values were signed when using 64bit. Task-number: QTBUG-31386 Change-Id: I891dbe1a82dc2aefbe13a131c72c01a57f981767 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r--src/plugins/platforms/windows/qwindowsmousehandler.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
index c6cfa4dbbc..43286eadf3 100644
--- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp
+++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
@@ -157,14 +157,19 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
QtWindows::WindowsEventType et,
MSG msg, LRESULT *result)
{
- enum { signatureMask = 0xffffff00, miWpSignature = 0xff515700 };
+#ifdef Q_COMPILER_CLASS_ENUM
+ enum : quint64 { signatureMask = 0xffffff00, miWpSignature = 0xff515700 };
+#else
+ static const quint64 signatureMask = 0xffffff00;
+ static const quint64 miWpSignature = 0xff515700;
+#endif // !Q_COMPILER_CLASS_ENUM
if (et == QtWindows::MouseWheelEvent)
return translateMouseWheelEvent(window, hwnd, msg, result);
#ifndef Q_OS_WINCE
// Check for events synthesized from touch. Lower byte is touch index, 0 means pen.
- const LPARAM extraInfo = GetMessageExtraInfo();
+ const quint64 extraInfo = GetMessageExtraInfo();
const bool fromTouch = (extraInfo & signatureMask) == miWpSignature && (extraInfo & 0xff);
if (fromTouch)
return false;