diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2017-02-22 17:06:23 +0100 |
---|---|---|
committer | Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> | 2017-03-29 13:36:03 +0000 |
commit | 886ce572d628e7cd98cc39edcc930ffae951e95e (patch) | |
tree | 67376063ad86f3c2b987a237c3c184d1cabe1aaf /src/plugins/platforms/windows/qwindowscontext.cpp | |
parent | 50ab231582fcef650eb1a800566907173bc67ef3 (diff) |
Windows QPA: don't resize fixed sized windows when changing screen
This seems to give pretty good result when EnableHighDPIScaling is NOT set.
But this seems to be worse when it's set.
Task-number: QTBUG-58959
Change-Id: I8de5a6c3c8b6146b1cb8f89676463206af404083
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscontext.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowscontext.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index b7a866679f..ff4ab1accb 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -1104,6 +1104,9 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, #endif } break; case QtWindows::DpiChangedEvent: { + if (GetWindowLongPtr(hwnd, GWL_STYLE) & WS_DLGFRAME) + return false; // Fixed-size window should not be resized + platformWindow->setFlag(QWindowsWindow::WithinDpiChanged); const RECT *prcNewWindow = reinterpret_cast<RECT *>(lParam); SetWindowPos(hwnd, NULL, prcNewWindow->left, prcNewWindow->top, |