windowManager: Split _shouldAnimate() into two functions
... instead of using an optional parameter. https://bugzilla.gnome.org/show_bug.cgi?id=674499
This commit is contained in:
parent
b7018de7e0
commit
a04350f7ce
@ -161,12 +161,14 @@ const WindowManager = new Lang.Class({
|
|||||||
this._animationBlockCount = Math.max(0, this._animationBlockCount - 1);
|
this._animationBlockCount = Math.max(0, this._animationBlockCount - 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
_shouldAnimate : function(actor) {
|
_shouldAnimate: function() {
|
||||||
if (Main.overview.visible || this._animationBlockCount > 0)
|
return !(Main.overview.visible || this._animationBlockCount > 0);
|
||||||
|
},
|
||||||
|
|
||||||
|
_shouldAnimateActor: function(actor) {
|
||||||
|
if (!this._shouldAnimate())
|
||||||
return false;
|
return false;
|
||||||
if (actor && (actor.meta_window.get_window_type() != Meta.WindowType.NORMAL))
|
return actor.meta_window.get_window_type() == Meta.WindowType.NORMAL;
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_removeEffect : function(list, actor) {
|
_removeEffect : function(list, actor) {
|
||||||
@ -179,7 +181,7 @@ const WindowManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_minimizeWindow : function(shellwm, actor) {
|
_minimizeWindow : function(shellwm, actor) {
|
||||||
if (!this._shouldAnimate(actor)) {
|
if (!this._shouldAnimateActor(actor)) {
|
||||||
shellwm.completed_minimize(actor);
|
shellwm.completed_minimize(actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -340,7 +342,7 @@ const WindowManager = new Lang.Class({
|
|||||||
shellwm.completed_map(actor);
|
shellwm.completed_map(actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this._shouldAnimate(actor)) {
|
if (!this._shouldAnimateActor(actor)) {
|
||||||
shellwm.completed_map(actor);
|
shellwm.completed_map(actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user