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> (cherry picked from commit 5a76837a7f4134454de65547043b78d51e3d7bef) Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
6ce5d0908d
commit
e5743ee7db
@ -125,14 +125,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();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user