From af59c56dc18cd866f8ad07fcf9cb606ca3848c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20S=C3=B8rvig?= Date: Thu, 12 May 2022 23:56:49 +0200 Subject: [PATCH] wasm: update m_normalGeometry on setGeometry() If we don't do this then applyWindowState() will apply the original window geometry from QWasmWindow::initialize(). Change-Id: I4a0fb7aa7984ba21c64364e0bf00d70513232d5d Reviewed-by: Lorn Potter Reviewed-by: David Skoland --- src/plugins/platforms/wasm/qwasmwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/wasm/qwasmwindow.cpp b/src/plugins/platforms/wasm/qwasmwindow.cpp index 1633ccf058..88bdd45542 100644 --- a/src/plugins/platforms/wasm/qwasmwindow.cpp +++ b/src/plugins/platforms/wasm/qwasmwindow.cpp @@ -88,6 +88,8 @@ void QWasmWindow::setGeometry(const QRect &rect) if (r.y() < yMin) r.moveTop(yMin); } + if (!m_windowState.testFlag(Qt::WindowFullScreen) && !m_windowState.testFlag(Qt::WindowMaximized)) + m_normalGeometry = r; QPlatformWindow::setGeometry(r); QWindowSystemInterface::handleGeometryChange(window(), r); invalidate();