Ensure that all Effects honour the grab roles correctly
ClosedPublic

Authored by graesslin on Oct 31 2016, 10:29 AM.

Details

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.3

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 7767.Oct 31 2016, 10:29 AM
graesslin retitled this revision from to Ensure that all Effects honour the grab roles correctly.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added reviewers: KWin, Plasma, broulik.
Restricted Application added a project: KWin. · View Herald TranscriptOct 31 2016, 10:29 AM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
broulik added inline comments.Nov 7 2016, 9:48 AM
libkwineffects/kwineffects.h
1551

5.8.4

hein added a subscriber: hein.Nov 7 2016, 9:49 AM
hein added inline comments.
libkwineffects/kwineffects.h
2036

The code in setData() always emits though, not just on a value change?

graesslin added inline comments.Nov 7 2016, 10:07 AM
libkwineffects/kwineffects.h
1551

I'll update that prior to pushing. If the change would have been reviewed when I uploaded it, it would have been correct.

2036

I'll change to "The signal EffectsHandler::windowDataChanged will be emitted"

graesslin updated this revision to Diff 7962.Nov 7 2016, 10:45 AM
  • 5.8.4
  • corrected docs
Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptNov 7 2016, 10:45 AM
hein accepted this revision.Nov 7 2016, 11:17 AM
hein added a reviewer: hein.
This revision is now accepted and ready to land.Nov 7 2016, 11:17 AM
This revision was automatically updated to reflect the committed changes.