From 226d196ab0edb04e98c12d3f7ff091bc021425e3 Mon Sep 17 00:00:00 2001 From: Romain Pokrzywka Date: Wed, 22 Aug 2018 21:54:13 -0500 Subject: Windows QPA: Improve Pointer Pen events translation Compute QPointF hi-res screen coordinates based on the HIMETRIC values contained in the native message. This gives the same high-precision screen coordinates as what the old WinTab handler supported. Add the possibility to not synthesize mouse events if the platform plugin option DontPassOsMouseEventsSynthesizedFromTouch is set, just like we do for finger touches. This makes it possible to have clean Pen events without mouse duplicates for an application that handles both input types in parallel. Add raw event logging when the platform verbose level is >1. Change-Id: Ibf68b6275400388a76f8d5c573eed8f4b9bf4e9d Reviewed-by: Andre de la Rocha Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowscontext.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/windows/qwindowscontext.cpp') diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index e29e5b8187..0df6264bcb 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -197,6 +197,7 @@ void QWindowsUser32DLL::init() enableMouseInPointer = (EnableMouseInPointer)library.resolve("EnableMouseInPointer"); getPointerType = (GetPointerType)library.resolve("GetPointerType"); getPointerInfo = (GetPointerInfo)library.resolve("GetPointerInfo"); + getPointerDeviceRects = (GetPointerDeviceRects)library.resolve("GetPointerDeviceRects"); getPointerTouchInfo = (GetPointerTouchInfo)library.resolve("GetPointerTouchInfo"); getPointerFrameTouchInfo = (GetPointerFrameTouchInfo)library.resolve("GetPointerFrameTouchInfo"); getPointerPenInfo = (GetPointerPenInfo)library.resolve("GetPointerPenInfo"); @@ -212,7 +213,8 @@ void QWindowsUser32DLL::init() bool QWindowsUser32DLL::supportsPointerApi() { - return enableMouseInPointer && getPointerType && getPointerInfo && getPointerTouchInfo && getPointerFrameTouchInfo && getPointerPenInfo; + return enableMouseInPointer && getPointerType && getPointerInfo && getPointerDeviceRects + && getPointerTouchInfo && getPointerFrameTouchInfo && getPointerPenInfo; } void QWindowsShcoreDLL::init() -- cgit v1.2.3