summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsmousehandler.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2013-09-20 14:41:38 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-08 07:19:36 +0200
commit94abcf98175d927f8e483c8f207c51034fd3b9fc (patch)
treeb4f7857a9a7c12ad0bcaf88e6379bf5e9916d669 /src/plugins/platforms/windows/qwindowsmousehandler.cpp
parent99468bab8aadefbeb125f357589f8e99f262b534 (diff)
Allow OS synthesized mouse events by default on Windows
https://codereview.qt-project.org/#change,66028 fixes Quick2 apps so there will be no need to ignore mouse events synthesized from touches by the OS. The mousefromtouch plugin parameter is changed to nomousefromtouch since mousefromtouch becomes the default. This will restore the OS-provided functionality, like translating tap-and-hold to right clicks, for Quick1 and widget apps. Change-Id: I5554a91a54365b9c72c3ad304010b9fc4e53ab24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsmousehandler.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsmousehandler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
index 8516af7bd9..b43aafeba0 100644
--- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp
+++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
@@ -170,7 +170,9 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
Qt::MouseEventSource source = Qt::MouseEventNotSynthesized;
#ifndef Q_OS_WINCE
- static const bool passSynthesizedMouseEvents = QWindowsIntegration::instance()->options() & QWindowsIntegration::PassOsMouseEventsSynthesizedFromTouch;
+ // Check for events synthesized from touch. Lower byte is touch index, 0 means pen.
+ static const bool passSynthesizedMouseEvents =
+ !(QWindowsIntegration::instance()->options() & QWindowsIntegration::DontPassOsMouseEventsSynthesizedFromTouch);
if (!passSynthesizedMouseEvents) {
// Check for events synthesized from touch. Lower 7 bits are touch/pen index, bit 8 indicates touch.
// However, when tablet support is active, extraInfo is a packet serial number. This is not a problem