From 5a76837a7f4134454de65547043b78d51e3d7bef Mon Sep 17 00:00:00 2001 From: Mikolaj Boc Date: Fri, 5 Aug 2022 10:58:51 +0200 Subject: [PATCH] Only manually expose the wasm window on raise/lower if it is visible If the window is manually exposed and the window is invisible, the result is blocking the visual sync and repainting of the window, which makes the window 'dead' from user perspective until they click/activate it, which again sends an expose event to the window, restoring its updates. Fixes: QTBUG-105363 Change-Id: Iaa42f3ffeca179b8e6da19c9c02a6f01458ca66a Reviewed-by: Lorn Potter --- src/plugins/platforms/wasm/qwasmwindow.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/wasm/qwasmwindow.cpp b/src/plugins/platforms/wasm/qwasmwindow.cpp index fbc1effb2c1..bfcc556d6da 100644 --- a/src/plugins/platforms/wasm/qwasmwindow.cpp +++ b/src/plugins/platforms/wasm/qwasmwindow.cpp @@ -120,14 +120,16 @@ QMargins QWasmWindow::frameMargins() const void QWasmWindow::raise() { m_compositor->raise(this); - QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(0, 0), geometry().size())); + if (window()->isVisible()) + QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(0, 0), geometry().size())); invalidate(); } void QWasmWindow::lower() { m_compositor->lower(this); - QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(0, 0), geometry().size())); + if (window()->isVisible()) + QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(0, 0), geometry().size())); invalidate(); }