Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit b1b1360e authored by David Edmundson's avatar David Edmundson

[effects/fadedesktop] Set animation as a fullscreen effect

Summary:
This lets other effects know whether they should inhibit or not which
reduces
visual glitches of overlapping animations.

BUG: 321201
FIXED-IN: 5.15.0

Test Plan: Switched desktops, they still faded

Reviewers: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15474
parent 25697680
......@@ -27,8 +27,11 @@ effect.configChanged.connect(function() {
loadConfig();
});
effects['desktopChanged(int,int)'].connect(function(oldDesktop, newDesktop) {
if (effects.hasActiveFullScreenEffect && !effect.isActiveFullScreenEffect) {
return;
}
var stackingOrder = effects.stackingOrder;
for (var i=0; i<stackingOrder.length; i++) {
for (var i = 0; i < stackingOrder.length; i++) {
var w = stackingOrder[i];
if (w.desktop != oldDesktop && w.desktop != newDesktop) {
continue;
......@@ -45,7 +48,8 @@ effects['desktopChanged(int,int)'].connect(function(oldDesktop, newDesktop) {
duration: duration,
animations: [{
type: Effect.Opacity,
to: 0.0
to: 0.0,
fullScreen: true
}]
});
} else {
......@@ -55,9 +59,20 @@ effects['desktopChanged(int,int)'].connect(function(oldDesktop, newDesktop) {
animations: [{
type: Effect.Opacity,
to: 1.0,
from: 0.0
from: 0.0,
fullScreen: true
}]
});
}
}
});
effect.isActiveFullScreenEffectChanged.connect(function() {
var isActiveFullScreen = effect.isActiveFullScreenEffect;
var stackingOrder = effects.stackingOrder;
for (var i = 0; i < stackingOrder.length; i++) {
var w = stackingOrder[i];
w.setData(Effect.WindowForceBlurRole, isActiveFullScreen);
w.setData(Effect.WindowForceBackgroundContrastRole, isActiveFullScreen);
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment