[effects/fadedesktop] Port to explicit animate API
Summary: No behavioural changes Test Plan: Set a slow animation speed Changed desktop Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D15473
This commit is contained in:
parent
9ebb7978de
commit
4ecbacff77
1 changed files with 17 additions and 2 deletions
|
@ -40,9 +40,24 @@ effects['desktopChanged(int,int)'].connect(function(oldDesktop, newDesktop) {
|
|||
continue;
|
||||
}
|
||||
if (w.desktop == oldDesktop) {
|
||||
effect.animate(w, Effect.Opacity, duration, 0.0);
|
||||
animate({
|
||||
window: w,
|
||||
duration: duration,
|
||||
animations: [{
|
||||
type: Effect.Opacity,
|
||||
to: 0.0
|
||||
}]
|
||||
});
|
||||
} else {
|
||||
effect.animate(w, Effect.Opacity, duration, w.opacity, 0.0);
|
||||
animate({
|
||||
window: w,
|
||||
duration: duration,
|
||||
animations: [{
|
||||
type: Effect.Opacity,
|
||||
to: w.opacity,
|
||||
from: 0.0
|
||||
}]
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue