Disable fade effect during fullscreen effects

Summary:
This means that if one opens/closes a window whilst present windows (for
example) is active we don't have two effects meddling with the opacity.

Like glide and scale this disables if it's invoked during an active full
screen effect, but it does not cancel animations that are running when a
full screen effect is launched.

Test Plan:
Windows still fade normally as before
Ran sleep ; dolphin with present windows / cube
Present windows fades windows itself so it's hard to see any difference
But it's more technically correct

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15933
icc-effect-5.17.5
David Edmundson 2018-10-04 13:05:51 +01:00
parent 12cc080945
commit a10647edf5
1 changed files with 6 additions and 0 deletions

View File

@ -53,6 +53,9 @@ effect.configChanged.connect(function() {
loadConfig();
});
function fadeInHandler(w) {
if (effects.hasActiveFullScreenEffect) {
return;
}
if (fadeWindows && isFadeWindow(w)) {
if (w.fadeOutWindowTypeAnimation !== undefined) {
cancel(w.fadeOutWindowTypeAnimation);
@ -62,6 +65,9 @@ function fadeInHandler(w) {
}
}
function fadeOutHandler(w) {
if (effects.hasActiveFullScreenEffect) {
return;
}
if (fadeWindows && isFadeWindow(w)) {
if (w.fadeOutWindowTypeAnimation !== undefined) {
// don't animate again as it was already animated through window hidden