diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2019-01-30 13:55:15 +0100 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2019-05-13 13:52:32 +0000 |
commit | 3af7b279177f7fb092f0e0fb9ffc8e8d846ed774 (patch) | |
tree | 576d1a52da95a0c8b2a805758da178a760ab5dfb /src/gui/kernel/qwindow_p.h | |
parent | 3da9d8a4fefc6f4e06320d2ba4c7c5fa8ebd1a10 (diff) | |
download | qtbase-3af7b279177f7fb092f0e0fb9ffc8e8d846ed774.tar.gz |
Fix QWindow::mapToGlobal()/mapFromGlobal() for multi-screen windows
Make these functions handle the case where a window spans multiple
screens, and high-DPI scaling is enabled, and the local position (in the
window) is not on the window primary screen (as returned by
QWindow::screen()).
This is done by detecting the case, and then calculating
the correct position using the native coordinate system.
[ChangeLog][QtGui] QWindow::mapToGlobal()/mapFromGlobal() now handle
windows spanning screens correctly.
Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io>
Task-number: QTBUG-73231
Change-Id: I3c31b741344d9e85e4f5d9e60bae75acce2db741
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui/kernel/qwindow_p.h')
-rw-r--r-- | src/gui/kernel/qwindow_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h index 5103d97c6d..745890f63f 100644 --- a/src/gui/kernel/qwindow_p.h +++ b/src/gui/kernel/qwindow_p.h @@ -148,7 +148,7 @@ public: void connectToScreen(QScreen *topLevelScreen); void disconnectFromScreen(); void emitScreenChangedRecursion(QScreen *newScreen); - QScreen *screenForGeometry(const QRect &rect); + QScreen *screenForGeometry(const QRect &rect) const; virtual void clearFocusObject(); virtual QRectF closestAcceptableGeometry(const QRectF &rect) const; |