[effects/fade] Don't fade in unminimized windows
AbandonedPublic

Authored by zzag on Jul 25 2018, 12:13 PM.

Details

Reviewers
None
Group Reviewers
KWin
Summary

The Fade effect fades unminimized windows. It should not do that because
it alters behavior of effects that animate the uniminimizing of windows,
e.g. the Magic lamp effect.

Test Plan

(a) Set animation time factor to 20x
(b) Enabled the Magic lamp effect
(c) Unminimized the System Settings window (it no longer fades in)

Diff Detail

Repository
R108 KWin
Branch
effects-fade-dont-fadein-unminimized-windows
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1170
Build 1183: arc lint + arc unit
zzag created this revision.Jul 25 2018, 12:13 PM
Restricted Application added a project: KWin. · View Herald TranscriptJul 25 2018, 12:13 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Jul 25 2018, 12:13 PM
zzag edited the test plan for this revision. (Show Details)Jul 25 2018, 12:18 PM
zzag added a comment.Jul 25 2018, 12:27 PM

Also, it matters whether a window has been grabbed previously(for example, by the Glide effect), but we shouldn't rely on that.

davidedmundson added inline comments.
effects/fade/package/contents/code/main.js
97

One could have fade but no other minimise effects.

Can we not test for a WindowUnminimizedGrabRole ?

zzag added inline comments.Jul 25 2018, 12:36 PM
effects/fade/package/contents/code/main.js
97

Does it have sense to introduce grab roles for minimization effects? We allow to have only one minimization effect.

Yeah, I believe we could, but I think it would be better to have a separate effect for this(the one that fades minimzed windows) because now it's not clear what the Fade effect is doing.

zzag added a comment.Jul 25 2018, 12:39 PM

Also, if we are about to allow fading of unminimized windows, we should delete !w.minimized check. Because otherwise behavior is not "symmetrical".

+1 on the design intent.

but I'm not convinced on the code
IMHO 451bbb54ddf864f80142f36a9d5d54f57e434f1c which introduced this is wrong and it is wrong because ShellClient is wrong. unmapping a window should be considered "deleting" an effectWindow. From an effect POV whether the client is re-using the shellsurface object (and since a Qt change years ago no-one actually does) or not shouldn't behave differently - and now we're on the wrong path.

If I don't get round to it for 5.15 feel free to merge this.

FYI, I had a go at a lower level fix
branch davidedmundson/waylandWindowClosedOnUnamp Needs a tiny bit of work still.

which would then mean we could simply not handle windowHide here.

zzag abandoned this revision.May 12 2020, 9:29 AM

Abandoned in favor of D27861.