Skip to content
Commit bf2e54fb authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

wayland: Make some animations less glitchy

If a minimized window is animated by the AnimationEffect, the final
layer repaint will be ineffective. In order to account for that, the
AnimationEffect adds the layer repaint to data.paint in the
prePaintScreen() hook. The issue with this hack is that it does not
work on Wayland with per screen rendering.

If a window is animated on screen B, but the layer repaint is added
to data.paint when screen A is painted, there will be a ghost of the
window on screen B.

In order to fix this issue, we need to use effects->addRepaint(), but
we cannot use it in prePaintScreen() as it won't have immediate effect.

effects->addRepaint() can be called either from window paint hooks
or from the postPaintScreen() hook. This change goes after the latter
option.

In the prePaintScreen() hook, AnimationEffect will only advance
animations. In the postPaintScreen() function, it will perform final
janitorial chore.
parent 33b2ea20
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