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:
Florian Müllner 2012-07-14 01:37:10 +02:00
parent 6ab25cd791
commit 04570ac783

View File

@ -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;
},
_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;
},
_mapWindow : function(shellwm, actor) {