Leave exposition to invalidate() in QWasmWindow::raise&lower

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 <morten.sorvig@qt.io>
bb10
Mikolaj Boc 2022-09-06 14:22:27 +02:00
parent 17e8f322eb
commit 06f5c9ca60
1 changed files with 0 additions and 4 deletions

View File

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