[effects/slidingpopups] Fix jumpy transition between In and Out animations
ClosedPublic

Authored by zzag on Sep 20 2018, 6:19 PM.

Details

Summary

If a window is being slided in and for some reason it gets closed, the
window will be slided out. The problem is that there is a jump between
the slide in animation and the slide out animation.

The reason for that is we cancel the slide in animation when the slide
out animation is started.

It makes sense to cancel previously active animations because they have
different durations. But visually, it doesn't look good.

TimeLine tries to preserve progress value when changing duration. Thus,
let's utilize that to fix the jump.

This change matters only with animation speed factor > 1.0.

CCBUG: 264276

Test Plan

Manually.

Diff Detail

Repository
R108 KWin
Branch
effects-slidingpopups-smooth-slide-in-out
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3036
Build 3054: arc lint + arc unit
zzag created this revision.Sep 20 2018, 6:19 PM
Restricted Application added a project: KWin. · View Herald TranscriptSep 20 2018, 6:19 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Sep 20 2018, 6:19 PM
zzag added a comment.EditedSep 20 2018, 6:20 PM

Before:

After:

zzag added a comment.EditedSep 20 2018, 6:23 PM

Regarding 264276, I suggest to mark it as WONTFIX. (or move to plasmashell product instead)

This patch is the best what we can do.

Each window could provide some token, but that would be overcomplicated (also, when we should delete tokens?). Windows have to be re-used instead, I guess.

abetts added a subscriber: abetts.Sep 20 2018, 6:36 PM

+1 for visual changes. Looks much more improved

zzag edited the summary of this revision. (Show Details)Sep 28 2018, 6:24 PM
davidedmundson accepted this revision.Oct 8 2018, 10:28 AM
This revision is now accepted and ready to land.Oct 8 2018, 10:28 AM
This revision was automatically updated to reflect the committed changes.