diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2017-02-14 13:06:36 +0100 |
---|---|---|
committer | Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> | 2017-02-15 14:19:12 +0000 |
commit | 1037eebc0b481678a40f034284d489e278be557a (patch) | |
tree | 314a9d5662d762c88af881a97154c089818573fb /src/plugins/platforms/windows/qwindowsscreen.cpp | |
parent | b5995afc790d07f15a822ae82c51ae03a19c3a8b (diff) |
Windows QPA: Use the native algorithm to find out the window's screen
QPlatformWindow::screenForGeometry uses the screen where the center
of the window is, but native application use the one which intersects
with the bigger area. It might not be the same.
Change-Id: I831a5fcaea0e293e9f0f93ef5e562cce57fae2f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsscreen.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsscreen.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp index bd598630ba..24fb12d27a 100644 --- a/src/plugins/platforms/windows/qwindowsscreen.cpp +++ b/src/plugins/platforms/windows/qwindowsscreen.cpp @@ -82,6 +82,7 @@ static bool monitorData(HMONITOR hMonitor, QWindowsScreenData *data) if (GetMonitorInfo(hMonitor, &info) == FALSE) return false; + data->hMonitor = hMonitor; data->geometry = QRect(QPoint(info.rcMonitor.left, info.rcMonitor.top), QPoint(info.rcMonitor.right - 1, info.rcMonitor.bottom - 1)); data->availableGeometry = QRect(QPoint(info.rcWork.left, info.rcWork.top), QPoint(info.rcWork.right - 1, info.rcWork.bottom - 1)); data->name = QString::fromWCharArray(info.szDevice); |