[gnome-shell] WorkspacesView: separate setting the full and the actual geometry



commit 309d40a92b953ce11e1cc62ac137cf02acca020f
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Thu May 8 19:15:19 2014 +0200

    WorkspacesView: separate setting the full and the actual geometry
    
    They are different properties, they deserve different syncs.
    Especially because a full allocation cycle sets both anyway, so
    we should save some cycles this way.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729823

 js/ui/workspacesView.js |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 5af5898..3dfbe1e 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -74,12 +74,12 @@ const WorkspacesViewBase = new Lang.Class({
 
     setFullGeometry: function(geom) {
         this._fullGeometry = geom;
-        this._syncGeometry();
+        this._syncFullGeometry();
     },
 
     setActualGeometry: function(geom) {
         this._actualGeometry = geom;
-        this._syncGeometry();
+        this._syncActualGeometry();
     },
 });
 
@@ -127,9 +127,12 @@ const WorkspacesView = new Lang.Class({
             this._workspaces[i].setReservedSlot(clone);
     },
 
-    _syncGeometry: function() {
+    _syncFullGeometry: function() {
         for (let i = 0; i < this._workspaces.length; i++)
             this._workspaces[i].setFullGeometry(this._fullGeometry);
+    },
+
+    _syncActualGeometry: function() {
         for (let i = 0; i < this._workspaces.length; i++)
             this._workspaces[i].setActualGeometry(this._actualGeometry);
     },
@@ -260,10 +263,12 @@ const WorkspacesView = new Lang.Class({
             }
         }
 
-        if (this._fullGeometry)
+        if (this._fullGeometry) {
             this._updateWorkspaceActors(false);
-
-        this._syncGeometry();
+            this._syncFullGeometry();
+        }
+        if (this._actualGeometry)
+            this._syncActualGeometry();
     },
 
     _activeWorkspaceChanged: function(wm, from, to, direction) {
@@ -352,8 +357,11 @@ const ExtraWorkspaceView = new Lang.Class({
         this._workspace.setReservedSlot(clone);
     },
 
-    _syncGeometry: function() {
+    _syncFullGeometry: function() {
         this._workspace.setFullGeometry(this._fullGeometry);
+    },
+
+    _syncActualGeometry: function() {
         this._workspace.setActualGeometry(this._actualGeometry);
     },
 


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