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
22 lines
701 B
JavaScript
22 lines
701 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, marked as fullscreen
|
|
w.anim1 = animate({
|
|
window: w,
|
|
duration: 1000,
|
|
animations: [{
|
|
type: Effect.Scale,
|
|
curve: Effect.GaussianCurve,
|
|
to: 1.4,
|
|
fullScreen: true
|
|
}, {
|
|
type: Effect.Opacity,
|
|
curve: Effect.GaussianCurve,
|
|
to: 0.0,
|
|
fullScreen: true
|
|
}]
|
|
});
|
|
}
|
|
});
|