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>
This commit is contained in:
parent
447ee95d5e
commit
2dd781df87
@ -1897,8 +1897,10 @@ void QWindowsWindow::handleGeometryChange()
|
|||||||
{
|
{
|
||||||
const QRect previousGeometry = m_data.geometry;
|
const QRect previousGeometry = m_data.geometry;
|
||||||
m_data.geometry = geometry_sys();
|
m_data.geometry = geometry_sys();
|
||||||
if (testFlag(WithinDpiChanged))
|
if (testFlag(WithinDpiChanged)
|
||||||
return; // QGuiApplication will send resize
|
&& QWindowsContext::instance()->screenManager().screenForHwnd(m_data.hwnd) != screen()) {
|
||||||
|
return; // QGuiApplication will send resize when screen actually changes
|
||||||
|
}
|
||||||
QWindowSystemInterface::handleGeometryChange(window(), m_data.geometry);
|
QWindowSystemInterface::handleGeometryChange(window(), m_data.geometry);
|
||||||
// QTBUG-32121: OpenGL/normal windows (with exception of ANGLE) do not receive
|
// QTBUG-32121: OpenGL/normal windows (with exception of ANGLE) do not receive
|
||||||
// expose events when shrinking, synthesize.
|
// expose events when shrinking, synthesize.
|
||||||
|
Loading…
Reference in New Issue
Block a user