scene: Sync Window::readyForPainting() to window item visibility
If a window is made ready for painting with some delay, the item won't schedule an update. To fix that, sync the item visibility state with Window::readyForPainting(). When the item visibility changes, a repaint will be scheduled. BUG: 464955
This commit is contained in:
parent
2babccda04
commit
37c4a4536e
2 changed files with 5 additions and 6 deletions
|
@ -126,6 +126,9 @@ void WindowItem::handleWindowClosed(Window *original, Deleted *deleted)
|
||||||
|
|
||||||
bool WindowItem::computeVisibility() const
|
bool WindowItem::computeVisibility() const
|
||||||
{
|
{
|
||||||
|
if (!m_window->readyForPainting()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (waylandServer() && waylandServer()->isScreenLocked()) {
|
if (waylandServer() && waylandServer()->isScreenLocked()) {
|
||||||
return m_window->isLockScreen() || m_window->isInputMethod() || m_window->isLockScreenOverlay();
|
return m_window->isLockScreen() || m_window->isInputMethod() || m_window->isLockScreenOverlay();
|
||||||
}
|
}
|
||||||
|
|
|
@ -443,13 +443,9 @@ void WorkspaceScene::createStackingOrder()
|
||||||
// window should not get focus before it's displayed, handle unredirected windows properly and
|
// window should not get focus before it's displayed, handle unredirected windows properly and
|
||||||
// so on.
|
// so on.
|
||||||
for (Window *window : std::as_const(windows)) {
|
for (Window *window : std::as_const(windows)) {
|
||||||
if (!window->readyForPainting()) {
|
if (window->windowItem()->isVisible()) {
|
||||||
continue;
|
stacking_order.append(window->windowItem());
|
||||||
}
|
}
|
||||||
if (!window->windowItem()->isVisible()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
stacking_order.append(window->windowItem());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue