effects/slidingpopups: Schedule workspace repaints

For optimization purposes, kwin will ignore repaint regions scheduled by
invisible windows, e.g. hidden docks, minimized windows, etc.

The problem is that it sort of breaks w->addRepaintFull(). If a lot of
animation frames are dropped, for example due to heavy cpu load, the
sliding popups animation can jump from the middle of animation right up
to the end. It will schedule a repaint but it will be ignored.

In order to work around that issue, this change makes the sliding popups
effect schedule workspace repaints in postPaintScreen() to ensure that
the Scene will always repaint dirty regions.

Hopefully, this should fix bugs where auto-hide panels sometimes flicker
on Wayland.

BUG: 444502
This commit is contained in:
Vlad Zahorodnii 2021-10-29 09:24:14 +03:00
parent b135a1c7b0
commit 1e634be2f5

View file

@ -178,7 +178,7 @@ void SlidingPopupsEffect::postPaintWindow(EffectWindow *w)
}
m_animations.erase(animationIt);
}
w->addRepaintFull();
effects->addRepaint(w->expandedGeometry());
}
effects->postPaintWindow(w);