From 9644f29b8b53bfd071dc9ccd13628e44e90d364a Mon Sep 17 00:00:00 2001 From: Alex Nemeth Date: Tue, 1 May 2018 23:03:14 +0200 Subject: [PATCH] [effects/maximize] Enable blur behind windows Summary: Use the blur effect even while the window is being maximized/unmaximized. Test Plan: Before: {F5828510} After: {F5828511} Reviewers: #kwin, #vdg, graesslin, ngraham Reviewed By: #kwin, #vdg, graesslin, ngraham Subscribers: ngraham, graesslin, zzag, kwin, #kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D12623 --- effects/maximize/package/contents/code/maximize.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/effects/maximize/package/contents/code/maximize.js b/effects/maximize/package/contents/code/maximize.js index 4345c04fa9..a8cb27fdc5 100644 --- a/effects/maximize/package/contents/code/maximize.js +++ b/effects/maximize/package/contents/code/maximize.js @@ -19,6 +19,7 @@ along with this program. If not, see . /*global effect, effects, animate, animationTime, Effect*/ var maximizeEffect = { duration: animationTime(250), + windowForceBlurRoleState: false, loadConfig: function () { "use strict"; maximizeEffect.duration = animationTime(250); @@ -28,6 +29,8 @@ var maximizeEffect = { if (!window.oldGeometry) { return; } + maximizeEffect.windowForceBlurRoleState = window.data(5); + window.setData(5, true); var oldGeometry, newGeometry; oldGeometry = window.oldGeometry; newGeometry = window.geometry; @@ -72,6 +75,9 @@ var maximizeEffect = { }); } }, + restoreForceBlurState: function(window) { + window.setData(5, maximizeEffect.windowForceBlurRoleState); + }, geometryChange: function (window, oldGeometry) { "use strict"; if (window.maximizeAnimation1) { @@ -93,6 +99,7 @@ var maximizeEffect = { effect.configChanged.connect(maximizeEffect.loadConfig); effects.windowGeometryShapeChanged.connect(maximizeEffect.geometryChange); effects.windowMaximizedStateChanged.connect(maximizeEffect.maximizeChanged); + effect.animationEnded.connect(maximizeEffect.restoreForceBlurState); } }; maximizeEffect.init();