gnome-shell r177 - trunk/js/ui



Author: danw
Date: Tue Feb  3 18:25:34 2009
New Revision: 177
URL: http://svn.gnome.org/viewvc/gnome-shell?rev=177&view=rev

Log:
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.


Modified:
   trunk/js/ui/windowManager.js

Modified: trunk/js/ui/windowManager.js
==============================================================================
--- trunk/js/ui/windowManager.js	(original)
+++ trunk/js/ui/windowManager.js	Tue Feb  3 18:25:34 2009
@@ -79,9 +79,16 @@
             });
     },
 
+    _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 @@
     },
     
     _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 @@
     _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 @@
     },
 
     _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 @@
         }
     },
 
-
     _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;
         }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]