summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsscreen.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-03-02 14:59:57 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2018-03-07 06:04:01 +0000
commit8abbb6ec725c41e08db8421f3e10b15b66ba28b1 (patch)
treed2c77bd1f99052951bd42409524f18ebb425ecd3 /src/plugins/platforms/windows/qwindowsscreen.cpp
parentf7b8f2e8b51f244ed459d869747f5abc48aceeb0 (diff)
Windows QPA: Fix scaling of tablet coordinates for High DPI scaling
Determine the virtual desktop geometry in native pixels from the QPlatformScreen siblings. Use the platform window to determine the local position. Task-number: QTBUG-36937 Change-Id: Ic250f1b41d8e74099558796112dbd70a7e1f6956 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsscreen.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp
index c0781df973..66d3b140e2 100644
--- a/src/plugins/platforms/windows/qwindowsscreen.cpp
+++ b/src/plugins/platforms/windows/qwindowsscreen.cpp
@@ -318,6 +318,15 @@ void QWindowsScreen::handleChanges(const QWindowsScreenData &newData)
}
}
+QRect QWindowsScreen::virtualGeometry(const QPlatformScreen *screen) // cf QScreen::virtualGeometry()
+{
+ QRect result;
+ const auto siblings = screen->virtualSiblings();
+ for (const QPlatformScreen *sibling : siblings)
+ result |= sibling->geometry();
+ return result;
+}
+
enum OrientationPreference // matching Win32 API ORIENTATION_PREFERENCE
#if defined(Q_COMPILER_CLASS_ENUM) || defined(Q_CC_MSVC)
: DWORD