diff options
author | Andreas Holzammer <andreas.holzammer@kdab.com> | 2017-03-21 15:48:04 +0100 |
---|---|---|
committer | Andreas Holzammer <andreas.holzammer@kdab.com> | 2017-03-24 07:54:45 +0000 |
commit | 7aebc2d0faa95b5e711c955613b745114a9f7a99 (patch) | |
tree | e5ed164283ae24789a3131dfd9637b57001e50eb /src | |
parent | 13c67432bd891e818eb22aace015e478ec45b92c (diff) |
WINCE: Don't receive touches by default from gestures
Windows Embedded Compact does send events from touch devices,
as mouse event and as gesture event. There is no way to
distinguish between a regular mouse event coming from a
a connected physical mouse or a touchscreen. There is also
no way to tell Windows to not deliver these touches as mouse
events.
Change-Id: Ia894ef9d1c0f8650f45f5bc328ce48f2505cac40
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsmousehandler.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp index 4ed708540c..c7ef428164 100644 --- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp +++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp @@ -567,7 +567,7 @@ bool QWindowsMouseHandler::translateGestureEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType, MSG msg, LRESULT *) { -#ifndef Q_OS_WINCE +#if !defined(Q_OS_WINCE) || !defined(QT_TOUCH_FROM_GESTURE) Q_UNUSED(window) Q_UNUSED(hwnd) Q_UNUSED(msg) diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 8770c6350a..c223863943 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -672,7 +672,7 @@ QWindowsWindowData context->frameX, context->frameY, context->frameWidth, context->frameHeight, parentHandle, NULL, appinst, NULL); -#ifdef Q_OS_WINCE +#if defined(Q_OS_WINCE) && defined(QT_TOUCH_FROM_GESTURE) if (DisableGestures(result.hwnd, TGF_GID_ALL, TGF_SCOPE_WINDOW)) EnableGestures(result.hwnd, TGF_GID_DIRECTMANIPULATION, TGF_SCOPE_WINDOW); #endif |