windowManager: Only animate dimming changes when necessary
Now that we no longer skip dimming/undimming windows while showing the overview, we can still save a bit of work by changing the dimming without animation while the window is hidden. https://bugzilla.gnome.org/show_bug.cgi?id=762475
This commit is contained in:
parent
4c29604e1e
commit
d8960b396b
@ -1367,11 +1367,14 @@ const WindowManager = new Lang.Class({
|
|||||||
let dimmer = getWindowDimmer(actor);
|
let dimmer = getWindowDimmer(actor);
|
||||||
if (!dimmer)
|
if (!dimmer)
|
||||||
return;
|
return;
|
||||||
Tweener.addTween(dimmer,
|
if (this._shouldAnimate())
|
||||||
{ dimFactor: 1.0,
|
Tweener.addTween(dimmer,
|
||||||
time: DIM_TIME,
|
{ dimFactor: 1.0,
|
||||||
transition: 'linear'
|
time: DIM_TIME,
|
||||||
});
|
transition: 'linear'
|
||||||
|
});
|
||||||
|
else
|
||||||
|
dimmer.dimFactor = 1.0;
|
||||||
},
|
},
|
||||||
|
|
||||||
_undimWindow: function(window) {
|
_undimWindow: function(window) {
|
||||||
@ -1381,10 +1384,13 @@ const WindowManager = new Lang.Class({
|
|||||||
let dimmer = getWindowDimmer(actor);
|
let dimmer = getWindowDimmer(actor);
|
||||||
if (!dimmer)
|
if (!dimmer)
|
||||||
return;
|
return;
|
||||||
Tweener.addTween(dimmer,
|
if (this._shouldAnimate())
|
||||||
{ dimFactor: 0.0,
|
Tweener.addTween(dimmer,
|
||||||
time: UNDIM_TIME,
|
{ dimFactor: 0.0,
|
||||||
transition: 'linear' });
|
time: UNDIM_TIME,
|
||||||
|
transition: 'linear' });
|
||||||
|
else
|
||||||
|
dimmer.dimFactor = 0.0;
|
||||||
},
|
},
|
||||||
|
|
||||||
_mapWindow : function(shellwm, actor) {
|
_mapWindow : function(shellwm, actor) {
|
||||||
|
Loading…
Reference in New Issue
Block a user