summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt/qwinrtscreen.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-07-27 11:22:57 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2018-07-31 13:33:14 +0200
commit23c9d4c98f3c6729b56700edc1d7144b444b16db (patch)
tree27b20ccbf3c101dbc7bcb1e509882b6c7fc75962 /src/plugins/platforms/winrt/qwinrtscreen.cpp
parentf69a5857d115786f44d053e68c36f74526020e82 (diff)
parent0ef66e98ccf4946a0e4513ab5fc157df0f0aca4e (diff)
Merge branch '5.11' into dev
Conflicts: qmake/library/qmakebuiltins.cpp src/plugins/platforms/windows/qwindowstabletsupport.h src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Done-With: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtscreen.cpp')
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp
index 2e79c3505b..7d6659f5e2 100644
--- a/src/plugins/platforms/winrt/qwinrtscreen.cpp
+++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp
@@ -1253,10 +1253,11 @@ HRESULT QWinRTScreen::onPointerUpdated(ICoreWindow *, IPointerEventArgs *args)
boolean isPressed;
pointerPoint->get_IsInContact(&isPressed);
- // Devices like the Hololens set a static pressure of 0.5 independent
- // of the pressed state. In those cases we need to synthesize the
- // pressure value. To our knowledge this does not apply to pens
- if (pointerDeviceType == PointerDeviceType_Touch && pressure == 0.5f)
+ // Devices like the Hololens set a static pressure of 0.0 or 0.5
+ // (depending on the image) independent of the pressed state.
+ // In those cases we need to synthesize the pressure value. To our
+ // knowledge this does not apply to pens
+ if (pointerDeviceType == PointerDeviceType_Touch && (pressure == 0.0f || pressure == 0.5f))
pressure = isPressed ? 1. : 0.;
const QRectF areaRect(area.X * d->scaleFactor, area.Y * d->scaleFactor,