windowManager: Remove 'animate' parameter from (un)dimWindow()
The parameter has become rather pointless since we always pass the same value. https://bugzilla.gnome.org/show_bug.cgi?id=674499
This commit is contained in:
parent
6ab25cd791
commit
04570ac783
@ -145,11 +145,11 @@ const WindowManager = new Lang.Class({
|
||||
|
||||
Main.overview.connect('showing', Lang.bind(this, function() {
|
||||
for (let i = 0; i < this._dimmedWindows.length; i++)
|
||||
this._undimWindow(this._dimmedWindows[i], true);
|
||||
this._undimWindow(this._dimmedWindows[i]);
|
||||
}));
|
||||
Main.overview.connect('hiding', Lang.bind(this, function() {
|
||||
for (let i = 0; i < this._dimmedWindows.length; i++)
|
||||
this._dimWindow(this._dimmedWindows[i], true);
|
||||
this._dimWindow(this._dimmedWindows[i]);
|
||||
}));
|
||||
},
|
||||
|
||||
@ -265,43 +265,37 @@ const WindowManager = new Lang.Class({
|
||||
window._dimmed = true;
|
||||
this._dimmedWindows.push(window);
|
||||
if (!Main.overview.visible)
|
||||
this._dimWindow(window, true);
|
||||
this._dimWindow(window);
|
||||
} else if (!shouldDim && window._dimmed) {
|
||||
window._dimmed = false;
|
||||
this._dimmedWindows = this._dimmedWindows.filter(function(win) {
|
||||
return win != window;
|
||||
});
|
||||
if (!Main.overview.visible)
|
||||
this._undimWindow(window, true);
|
||||
this._undimWindow(window);
|
||||
}
|
||||
},
|
||||
|
||||
_dimWindow: function(window, animate) {
|
||||
_dimWindow: function(window) {
|
||||
let actor = window.get_compositor_private();
|
||||
if (!actor)
|
||||
return;
|
||||
if (animate)
|
||||
Tweener.addTween(getWindowDimmer(actor),
|
||||
{ dimFraction: 1.0,
|
||||
time: DIM_TIME,
|
||||
transition: 'linear'
|
||||
});
|
||||
else
|
||||
getWindowDimmer(actor).dimFraction = 1.0;
|
||||
Tweener.addTween(getWindowDimmer(actor),
|
||||
{ dimFraction: 1.0,
|
||||
time: DIM_TIME,
|
||||
transition: 'linear'
|
||||
});
|
||||
},
|
||||
|
||||
_undimWindow: function(window, animate) {
|
||||
_undimWindow: function(window) {
|
||||
let actor = window.get_compositor_private();
|
||||
if (!actor)
|
||||
return;
|
||||
if (animate)
|
||||
Tweener.addTween(getWindowDimmer(actor),
|
||||
{ dimFraction: 0.0,
|
||||
time: UNDIM_TIME,
|
||||
transition: 'linear'
|
||||
});
|
||||
else
|
||||
getWindowDimmer(actor).dimFraction = 0.0;
|
||||
Tweener.addTween(getWindowDimmer(actor),
|
||||
{ dimFraction: 0.0,
|
||||
time: UNDIM_TIME,
|
||||
transition: 'linear'
|
||||
});
|
||||
},
|
||||
|
||||
_mapWindow : function(shellwm, actor) {
|
||||
|
Loading…
Reference in New Issue
Block a user