From 4117739abb31c1a44bb28a18ac3615bff0beae0c Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 3 Feb 2009 18:25:34 +0000 Subject: [PATCH] Don't do window transitions while the overlay is active. Part of #568983. Previously we were only doing this check for switch-workspace, but it makes sense to do it for all transitions, since they won't be visible anyway, and they might interfere with the overlay's operations by moving windows around unexpectedly. svn path=/trunk/; revision=177 --- js/ui/windowManager.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 60f329a57..77231f9d3 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -79,9 +79,16 @@ WindowManager.prototype = { }); }, + _shouldAnimate : function(actor) { + if (Main.overlayActive) + return false; + if (actor && (actor.get_window_type() != Meta.CompWindowType.NORMAL)) + return false; + return true; + }, _minimizeWindow : function(actor) { - if (actor.get_window_type() != Meta.CompWindowType.NORMAL) { + if (!this._shouldAnimate(actor)) { this._shellwm.completed_minimize(actor); return; } @@ -117,7 +124,7 @@ WindowManager.prototype = { }, _maximizeWindow : function(actor, target_x, target_y, target_width, target_height) { - if (actor.get_window_type() != Meta.CompWindowType.NORMAL) { + if (!this._shouldAnimate(actor)) { this._shellwm.completed_maximize(actor); return; } @@ -164,9 +171,8 @@ WindowManager.prototype = { _unmaximizeWindowDone : function(actor) { }, - _mapWindow : function(actor) { - if (actor.get_window_type() != Meta.CompWindowType.NORMAL) { + if (!this._shouldAnimate(actor)) { this._shellwm.completed_map(actor); return; } @@ -201,7 +207,7 @@ WindowManager.prototype = { }, _destroyWindow : function(actor) { - if (actor.get_window_type() != Meta.CompWindowType.NORMAL) { + if (!this._shouldAnimate(actor)) { this._shellwm.completed_destroy(actor); return; } @@ -232,10 +238,8 @@ WindowManager.prototype = { } }, - _switchWorkspace : function(windows, from, to, direction) { - // If the overlay is active, it will do the transition itself - if (Main.overlayActive) { + if (!this._shouldAnimate()) { this._shellwm.completed_switch_workspace(); return; }