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
|
||||
{
|
||||
if (!m_window->readyForPainting()) {
|
||||
return false;
|
||||
}
|
||||
if (waylandServer() && waylandServer()->isScreenLocked()) {
|
||||
return m_window->isLockScreen() || m_window->isInputMethod() || m_window->isLockScreenOverlay();
|
||||
}
|
||||
|
|
|
@ -443,15 +443,11 @@ void WorkspaceScene::createStackingOrder()
|
|||
// window should not get focus before it's displayed, handle unredirected windows properly and
|
||||
// so on.
|
||||
for (Window *window : std::as_const(windows)) {
|
||||
if (!window->readyForPainting()) {
|
||||
continue;
|
||||
}
|
||||
if (!window->windowItem()->isVisible()) {
|
||||
continue;
|
||||
}
|
||||
if (window->windowItem()->isVisible()) {
|
||||
stacking_order.append(window->windowItem());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void WorkspaceScene::clearStackingOrder()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue