diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-09-12 08:54:58 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-09-17 15:19:18 +0200 |
commit | 2dd781df87b98697c815183e4abeb226577230ab (patch) | |
tree | 7c27c8e0c28aeb7b48ebbbae87555fa732d607a9 /src/plugins | |
parent | 447ee95d5e050c5db1636c5d3bd0edbf59f26108 (diff) |
Windows QPA: Fix missing resize when changing the scale factor
Do not suppress the resize event caused by the handling of
WM_DPICHANGED unless the screen really changed.
Fixes: QTBUG-76510
Change-Id: I8b9ae41ad7deb863c1633ec5901bc04304b2165c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 79681fd1fa..519a2daae9 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1897,8 +1897,10 @@ void QWindowsWindow::handleGeometryChange() { const QRect previousGeometry = m_data.geometry; m_data.geometry = geometry_sys(); - if (testFlag(WithinDpiChanged)) - return; // QGuiApplication will send resize + if (testFlag(WithinDpiChanged) + && QWindowsContext::instance()->screenManager().screenForHwnd(m_data.hwnd) != screen()) { + return; // QGuiApplication will send resize when screen actually changes + } QWindowSystemInterface::handleGeometryChange(window(), m_data.geometry); // QTBUG-32121: OpenGL/normal windows (with exception of ANGLE) do not receive // expose events when shrinking, synthesize. |