diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2020-05-20 14:27:16 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2020-10-20 07:26:38 +0200 |
commit | 0ab89881c5aecc31e44fd83b1a63bd4de52ebe4a (patch) | |
tree | 7695c6a3f3eda3b48bc8dc0a55c184b64cbd7515 /src/gui/kernel/qhighdpiscaling_p.h | |
parent | e8fabb29462e6ee268bde5267e3d7bca23addbb2 (diff) |
high-dpi: Re-implement mapToGlobal and mapFromGlobal
(This code is required to handle corner cases such as a QWindow
covering multiple screens, where the normal code path does not
give correct results.)
Move the map[to|from]Global implementation from qhighdpiscaling.cpp,
and implement it in terms of [to|from]NativeGlobalPosition. These
functions implement the required screenAt()-type searching.
The implementation strategy for both mapping functions is to first
map to the native coordinate system, perform the globalPos addition
or subtraction, and then map the result back to device independent
coordinates.
Task-number: QTBUG-81695
Change-Id: I44e9e68651634650964e839b1e564b50f434553f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui/kernel/qhighdpiscaling_p.h')
-rw-r--r-- | src/gui/kernel/qhighdpiscaling_p.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/gui/kernel/qhighdpiscaling_p.h b/src/gui/kernel/qhighdpiscaling_p.h index f7cf4792f2..cf21a90f70 100644 --- a/src/gui/kernel/qhighdpiscaling_p.h +++ b/src/gui/kernel/qhighdpiscaling_p.h @@ -123,8 +123,6 @@ public: static QPoint mapPositionFromNative(const QPoint &pos, const QPlatformScreen *platformScreen); static QPoint mapPositionToNative(const QPoint &pos, const QPlatformScreen *platformScreen); - static QPointF mapPositionToGlobal(const QPointF &pos, const QPoint &windowGlobalPosition, const QWindow *window); - static QPointF mapPositionFromGlobal(const QPointF &pos, const QPoint &windowGlobalPosition, const QWindow *window); static QDpi logicalDpi(const QScreen *screen); private: |