396d528075
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. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: davidedmundson, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16450
19 lines
455 B
JavaScript
19 lines
455 B
JavaScript
effects.windowAdded.connect(function (window) {
|
|
window.animation = set({
|
|
window: window,
|
|
curve: QEasingCurve.Linear,
|
|
duration: animationTime(1000),
|
|
type: Effect.Opacity,
|
|
from: 0,
|
|
to: 1,
|
|
keepAlive: false
|
|
});
|
|
});
|
|
|
|
effects.windowMinimized.connect(function (window) {
|
|
if (complete(window.animation)) {
|
|
sendTestResponse('ok');
|
|
} else {
|
|
sendTestResponse('fail');
|
|
}
|
|
});
|