diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-02-29 12:34:31 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2016-02-29 12:34:31 +0100 |
commit | a224dfc9d19757734bf49fcefdeaad5d855dfe98 (patch) | |
tree | 83b61bea7fa243557febe9652f3f16d265a2689a /src/plugins/platforms/windows/qwindowswindow.cpp | |
parent | be84480785b9686dc09937fa33b685de7cc570f1 (diff) | |
parent | f253f4c3310655933266f62e90f46fd12b5c49e4 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
tests/auto/corelib/io/qprocess/tst_qprocess.cpp
Change-Id: Ib6955eb874b516b185b45d6c38cec646fbaa95f4
Diffstat (limited to 'src/plugins/platforms/windows/qwindowswindow.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index c1a047e276..d9a7586096 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -2203,14 +2203,15 @@ void QWindowsWindow::getSizeHints(MINMAXINFO *mmi) const // Documentation of MINMAXINFO states that it will only work for the primary screen if (screen && screen == QGuiApplication::primaryScreen()) { - mmi->ptMaxSize.y = screen->availableGeometry().height(); + const QRect availableGeometry = QHighDpi::toNativePixels(screen->availableGeometry(), screen); + mmi->ptMaxSize.y = availableGeometry.height(); // Width, because you can have the taskbar on the sides too. - mmi->ptMaxSize.x = screen->availableGeometry().width(); + mmi->ptMaxSize.x = availableGeometry.width(); // If you have the taskbar on top, or on the left you don't want it at (0,0): - mmi->ptMaxPosition.x = screen->availableGeometry().x(); - mmi->ptMaxPosition.y = screen->availableGeometry().y(); + mmi->ptMaxPosition.x = availableGeometry.x(); + mmi->ptMaxPosition.y = availableGeometry.y(); } else if (!screen){ qWarning() << "window()->screen() returned a null screen"; } |