From 06f5c9ca6094c28db765830e377ddeada07c1ba3 Mon Sep 17 00:00:00 2001 From: Mikolaj Boc Date: Tue, 6 Sep 2022 14:22:27 +0200 Subject: [PATCH] Leave exposition to invalidate() in QWasmWindow::raise&lower MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The window may be in a temporary state where the window()->handle() is not yet set up. This makes an expose event with isExposed == false being issued, which makes the window not refresh, especially when a async expose request follows shortly after. invalidate() handles this case itself as it issues a request to the compositor which exposes the window at the right moment. Fixes: QTBUG-106159 Change-Id: Ibc84490c379774120ab65978472e35be25240164 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/wasm/qwasmwindow.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/plugins/platforms/wasm/qwasmwindow.cpp b/src/plugins/platforms/wasm/qwasmwindow.cpp index 08e8eec9b1..700a7ef75a 100644 --- a/src/plugins/platforms/wasm/qwasmwindow.cpp +++ b/src/plugins/platforms/wasm/qwasmwindow.cpp @@ -183,16 +183,12 @@ QMargins QWasmWindow::frameMargins() const void QWasmWindow::raise() { m_compositor->raise(this); - if (window()->isVisible()) - QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(0, 0), geometry().size())); invalidate(); } void QWasmWindow::lower() { m_compositor->lower(this); - if (window()->isVisible()) - QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(0, 0), geometry().size())); invalidate(); }