Summary:
When windows get added some effects grab the window and want to be the
only one animating this window. For this the grab roles exists. An
effect being notified later on evaluates the grab state and does not
start the animation.
This process failed due to being dependent on the order the effects are
loaded. Window Added/Closed are signals emitted by EffectsHandler, thus
first come, first serve. The requested effect order does not play into
it.
Due to that it could happen that an Effect which should not animate,
started to animate as the grab was still there.
This change adds the possibility to be notified whenever the window data
changes. A new signal is added to EffectsHandler which is emitted
whenever the windowData changes. The interested effects connect to it
and cancel their (just started) animation for the window.
Adjusted effects are:
* ScaleIn
* Fade
* WobblyWindows
In case of WobblyWindows an additional logical error was fixed that the
animations were only run when an effect grabbed instead of the other way
around.
BUG: 336866
FIXED-IN: 5.8.4
Reviewers: #kwin, #plasma, broulik
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3211
The first test case was sometimes failing due to the time value in the
first render pass being too high. So that the effect ended directly for
the window.
This change adds a small waiting time for the compositor to render prior
to the creation of the window. Ideally we would connect to frameRendered
signal, but the OpenGL compositor doesn't emit it yet.
Test more combinations of other effects together with sliding popups.
The problem does not only exist for scale in but for pretty much any
effect that the ordering in which the effects get loaded makes the test
pass or fail.
Some effects require OpenGL, as build.kde.org does not support OpenGL
compositing (yet), the tests only do the OpenGL cases if an OpenGL
compositor could be created.
CCBUG: 336866
The test case loads the sliding popups effect and the scale in effect
which also operates on added windows. As the test case shows depending
on the sequence how the effects are loaded, the window gets animated by
both effects (wrong) oor only sliding popups.
CCBUG: 336866