diff options
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtscreen.cpp')
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtscreen.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp index 928fff32d6..e39a87148a 100644 --- a/src/plugins/platforms/winrt/qwinrtscreen.cpp +++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp @@ -1250,10 +1250,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, |