[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
This commit is contained in:
parent
c3e84e1073
commit
9644f29b8b
1 changed files with 7 additions and 0 deletions
|
@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
/*global effect, effects, animate, animationTime, Effect*/
|
/*global effect, effects, animate, animationTime, Effect*/
|
||||||
var maximizeEffect = {
|
var maximizeEffect = {
|
||||||
duration: animationTime(250),
|
duration: animationTime(250),
|
||||||
|
windowForceBlurRoleState: false,
|
||||||
loadConfig: function () {
|
loadConfig: function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
maximizeEffect.duration = animationTime(250);
|
maximizeEffect.duration = animationTime(250);
|
||||||
|
@ -28,6 +29,8 @@ var maximizeEffect = {
|
||||||
if (!window.oldGeometry) {
|
if (!window.oldGeometry) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
maximizeEffect.windowForceBlurRoleState = window.data(5);
|
||||||
|
window.setData(5, true);
|
||||||
var oldGeometry, newGeometry;
|
var oldGeometry, newGeometry;
|
||||||
oldGeometry = window.oldGeometry;
|
oldGeometry = window.oldGeometry;
|
||||||
newGeometry = window.geometry;
|
newGeometry = window.geometry;
|
||||||
|
@ -72,6 +75,9 @@ var maximizeEffect = {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
restoreForceBlurState: function(window) {
|
||||||
|
window.setData(5, maximizeEffect.windowForceBlurRoleState);
|
||||||
|
},
|
||||||
geometryChange: function (window, oldGeometry) {
|
geometryChange: function (window, oldGeometry) {
|
||||||
"use strict";
|
"use strict";
|
||||||
if (window.maximizeAnimation1) {
|
if (window.maximizeAnimation1) {
|
||||||
|
@ -93,6 +99,7 @@ var maximizeEffect = {
|
||||||
effect.configChanged.connect(maximizeEffect.loadConfig);
|
effect.configChanged.connect(maximizeEffect.loadConfig);
|
||||||
effects.windowGeometryShapeChanged.connect(maximizeEffect.geometryChange);
|
effects.windowGeometryShapeChanged.connect(maximizeEffect.geometryChange);
|
||||||
effects.windowMaximizedStateChanged.connect(maximizeEffect.maximizeChanged);
|
effects.windowMaximizedStateChanged.connect(maximizeEffect.maximizeChanged);
|
||||||
|
effect.animationEnded.connect(maximizeEffect.restoreForceBlurState);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
maximizeEffect.init();
|
maximizeEffect.init();
|
||||||
|
|
Loading…
Reference in a new issue