Commit 8ca83ef1 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

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


(cherry picked from commit 1e634be2)
parent c4c03e25
...@@ -178,7 +178,7 @@ void SlidingPopupsEffect::postPaintWindow(EffectWindow *w) ...@@ -178,7 +178,7 @@ void SlidingPopupsEffect::postPaintWindow(EffectWindow *w)
} }
m_animations.erase(animationIt); m_animations.erase(animationIt);
} }
w->addRepaintFull(); effects->addRepaint(w->expandedGeometry());
} }
effects->postPaintWindow(w); effects->postPaintWindow(w);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment