[scripting] Introduce complete function
ClosedPublic

Authored by zzag on Oct 27 2018, 9:16 AM.

Details

Summary

Effects that prefer to manipulate direction of animations sometimes need
to create animations in some particular state so later on they can be
played backward (swapping from and to is not enough and it would be wrong).

The proposed complete function lets such effects to fast-forward animations to
to the target position so they can be played backwards later on.

Diff Detail

Repository
R108 KWin
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 5031
Build 5049: arc lint + arc unit
zzag created this revision.Oct 27 2018, 9:16 AM
Restricted Application added a project: KWin. · View Herald TranscriptOct 27 2018, 9:16 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Oct 27 2018, 9:16 AM
zzag planned changes to this revision.Oct 29 2018, 9:51 AM

Implement complete() instead.

zzag updated this revision to Diff 44429.Oct 29 2018, 11:08 AM

Implement complete().

davidedmundson accepted this revision.Oct 29 2018, 11:14 AM
davidedmundson added a subscriber: davidedmundson.

++

scripting/scriptedeffect.cpp
460

There's a minor behavioural difference compared to cancel/retarget.

They return false if animationIds is empty, you return true

(same comment for redirect)

Not a huge issue, but probably worth being consistent.

This revision is now accepted and ready to land.Oct 29 2018, 11:14 AM
zzag retitled this revision from [scripting] Introduce rewind function to [scripting] Introduce complete function.Oct 29 2018, 11:14 AM
zzag edited the summary of this revision. (Show Details)
zzag added inline comments.Oct 29 2018, 11:18 AM
scripting/scriptedeffect.cpp
460

Won't QList<quint64> animations(const QVariant &v, bool *ok) take care of that?

scripting/scriptedeffect.cpp
460

Oh, it does.
(though my QQmlEngine port drops that function)

zzag updated this revision to Diff 44843.Nov 4 2018, 1:28 PM

Rebase.

zzag updated this revision to Diff 44844.Nov 4 2018, 1:28 PM

Wrong commit

zzag updated this revision to Diff 45648.Nov 17 2018, 11:40 AM

Rebase.

zzag updated this revision to Diff 45649.Nov 17 2018, 11:41 AM

Wrong diff.

This revision was automatically updated to reflect the committed changes.