summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsintegration.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/qwindowsintegration.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/qwindowsintegration.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index d7ac4cfc1e..adac7aa254 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -346,8 +346,8 @@ static inline unsigned parseOptions(const QStringList &paramList)
}
} else if (param == QLatin1String("gl=gdi")) {
options |= QWindowsIntegration::DisableArb;
- } else if (param == QLatin1String("mousefromtouch")) {
- options |= QWindowsIntegration::PassOsMouseEventsSynthesizedFromTouch;
+ } else if (param == QLatin1String("nomousefromtouch")) {
+ options |= QWindowsIntegration::DontPassOsMouseEventsSynthesizedFromTouch;
}
}
return options;
@@ -566,11 +566,9 @@ QVariant QWindowsIntegration::styleHint(QPlatformIntegration::StyleHint hint) co
case QPlatformIntegration::SynthesizeMouseFromTouchEvents:
#ifdef Q_OS_WINCE
// We do not want Qt to synthesize mouse events as Windows also does that.
- // Alternatively, Windows-generated touch mouse events can be identified and
- // ignored by checking GetMessageExtraInfo() for MI_WP_SIGNATURE (0xFF515700).
return false;
#else // Q_OS_WINCE
- return QVariant(!(d->m_options & PassOsMouseEventsSynthesizedFromTouch));
+ return QVariant(bool(d->m_options & DontPassOsMouseEventsSynthesizedFromTouch));
#endif // !Q_OS_WINCE
default:
break;