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 <lorn.potter@gmail.com>
This commit is contained in:
Mikolaj Boc 2022-08-05 10:58:51 +02:00 committed by Mikołaj Boc
parent fa4db87706
commit 5a76837a7f

View File

@ -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();
}