[effects/fade] Do some refactoring
AbandonedPublic

Authored by zzag on Dec 25 2017, 9:17 AM.

Details

Reviewers
None
Group Reviewers
KWin

Diff Detail

Repository
R108 KWin
Branch
effects/fade
Lint
No Linters Available
Unit
No Unit Test Coverage
zzag created this revision.Dec 25 2017, 9:17 AM
Restricted Application added a project: KWin. · View Herald TranscriptDec 25 2017, 9:17 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Dec 25 2017, 9:17 AM
zzag added a comment.EditedDec 25 2017, 9:17 AM

Side note: this effect is really buggy. Do minimize/unminimize or switch between virtual desktops really fast with slide effect and you'll notice false triggers.
I think EffectsHandler::windowShown and EffectsHandler::windowHidden should be extended. They should have an optional parameter why. It would tell an effect why a window has become visible or hidden(e.g. _BY_DESKTOP, _BY_ACTIVITY, _BY_MINIMIZE, _BY_APP, _BY_UNKNOWN, etc).

mart added a subscriber: mart.Jan 12 2018, 3:46 PM
mart added inline comments.
effects/fade/package/contents/config/main.xml
9

is renaming the config keys necessary? this will break configs of users who had a custom value

zzag added inline comments.Jan 13 2018, 10:23 AM
effects/fade/package/contents/config/main.xml
9

is renaming the config keys necessary?

Yep, "duration" makes more sense than "time".

this will break configs of users who had a custom value

This effect doesn't have a KCModule so users have to edit ~/.config/kwinrc (which requires some developer beast skills because the only way to know what config keys are available is to dig into the source code). In my opinion, we're free to rename config keys because they are not really "public".

zzag abandoned this revision.Mar 17 2018, 12:58 PM