99b33e7428
Summary: Getter is exposed as a property on scripted effect in a way that hides pointers from the scripting side. Setter is implicitly handled as a property of newly created animations and holds the activeFullScreenEffect whilst any of them are active. Like existing effects it remains up to the effect author to avoid the problems of multiple full screen effects. The RAII lock pattern is somewhat overkill currently, but it's the direction I hope we can take EffectsHandler in next API break. BUG: 396790 -- This patch is against the QJSEngine port, though it's not conceptually a requirement. Test Plan: Unit test Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D14688
8 lines
383 B
JavaScript
8 lines
383 B
JavaScript
effects['desktopChanged(int,int)'].connect(function(old, current) {
|
|
var stackingOrder = effects.stackingOrder;
|
|
for (var i=0; i<stackingOrder.length; i++) {
|
|
var w = stackingOrder[i];
|
|
//1 second long random animation. Final param indicates fullscreen
|
|
w.anim1 = effect.animate(w, Effect.Scale, 1000, 1.4, 0.2, 0, QEasingCurve.Linear, 0, true);
|
|
}
|
|
});
|