diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-09-06 11:16:29 +0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-09 14:49:33 +0200 |
commit | 560de9725da348e2810c700dda6b25a668e8bd58 (patch) | |
tree | a9404c74e20580ec0885870d70cdf8a0923f3a9d /src/plugins/platforms/windows/qwindowsintegration.cpp | |
parent | c03d0a984682ce5cea5a5882bab0075318b18f08 (diff) |
Windows: Add command line parameter enabling OS-synthesized mouse events from touch.
Applications launched with -platform windows:mousefromtouch will
receive OS-synthesized mouse events.
Task-number: QTBUG-31386
Change-Id: I1c49486589c4a7fa4fb5525f7a5adca09b1cfb89
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsintegration.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsintegration.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index 754d7a0288..5f1f9cf149 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -342,6 +342,8 @@ static inline unsigned parseOptions(const QStringList ¶mList) } } else if (param == QLatin1String("gl=gdi")) { options |= QWindowsIntegration::DisableArb; + } else if (param == QLatin1String("mousefromtouch")) { + options |= QWindowsIntegration::PassOsMouseEventsSynthesizedFromTouch; } } return options; @@ -557,13 +559,15 @@ QVariant QWindowsIntegration::styleHint(QPlatformIntegration::StyleHint hint) co break; case QPlatformIntegration::UseRtlExtensions: return QVariant(d->m_context.useRTLExtensions()); -#ifdef Q_OS_WINCE 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; -#endif // Q_OS_WINCE +#else // Q_OS_WINCE + return QVariant(!(d->m_options & PassOsMouseEventsSynthesizedFromTouch)); +#endif // !Q_OS_WINCE default: break; } |