Commit 9644f29b authored by Alex Nemeth's avatar Alex Nemeth
Browse files

[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
parent c3e84e10
......@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/*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();
Supports Markdown
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