[gnome-shell] workspacesView: Don't set full geometry



commit d66cd0d2067ae2501b17021b50ee32cbc638a3b7
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Jun 27 17:32:14 2020 +0200

    workspacesView: Don't set full geometry
    
    It's not used anymore.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345

 js/ui/overviewControls.js | 22 ----------------------
 js/ui/viewSelector.js     |  4 ----
 js/ui/workspacesView.js   | 28 ----------------------------
 3 files changed, 54 deletions(-)
---
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
index 3d665dc1e7..8fac5fc3d2 100644
--- a/js/ui/overviewControls.js
+++ b/js/ui/overviewControls.js
@@ -455,8 +455,6 @@ class ControlsManager extends St.Widget {
         this._group.add_child(this.viewSelector);
         this._group.add_actor(this._thumbnailsSlider);
 
-        layout.connect('allocation-changed', this._updateWorkspacesGeometry.bind(this));
-
         Main.overview.connect('showing', this._updateSpacerVisibility.bind(this));
 
         this.connect('destroy', this._onDestroy.bind(this));
@@ -479,26 +477,6 @@ class ControlsManager extends St.Widget {
         this._workspaceAdjustment.value = activeIndex;
     }
 
-    _updateWorkspacesGeometry() {
-        let [x, y] = this.get_transformed_position();
-        let [width, height] = this.get_transformed_size();
-        let geometry = { x, y, width, height };
-
-        let spacing = this.get_theme_node().get_length('spacing');
-        let dashWidth = this._dashSlider.getVisibleWidth() + spacing;
-        let thumbnailsWidth = this._thumbnailsSlider.getNonExpandedWidth() + spacing;
-
-        geometry.width -= dashWidth;
-        geometry.width -= thumbnailsWidth;
-
-        if (this.get_text_direction() == Clutter.TextDirection.LTR)
-            geometry.x += dashWidth;
-        else
-            geometry.x += thumbnailsWidth;
-
-        this.viewSelector.setWorkspacesFullGeometry(geometry);
-    }
-
     _setVisibility() {
         // Ignore the case when we're leaving the overview, since
         // actors will be made visible again when entering the overview
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index aefe806a84..bfb02a54ec 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -299,10 +299,6 @@ var ViewSelector = GObject.registerClass({
             Main.overview.fadeInDesktop();
     }
 
-    setWorkspacesFullGeometry(geom) {
-        this._workspacesDisplay.setWorkspacesFullGeometry(geom);
-    }
-
     vfunc_hide() {
         this.reset();
         this._workspacesDisplay.hide();
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 1e63cfe74f..07b7ee4fe7 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -33,8 +33,6 @@ var WorkspacesViewBase = GObject.registerClass({
 
         this._monitorIndex = monitorIndex;
 
-        this._fullGeometry = null;
-
         this._inDrag = false;
         this._windowDragBeginId = Main.overview.connect('window-drag-begin', this._dragBegin.bind(this));
         this._windowDragEndId = Main.overview.connect('window-drag-end', this._dragEnd.bind(this));
@@ -63,10 +61,6 @@ var WorkspacesViewBase = GObject.registerClass({
         this._setReservedSlot(null);
     }
 
-    setFullGeometry(geom) {
-        this._fullGeometry = geom;
-    }
-
     vfunc_allocate(box) {
         this.set_allocation(box);
 
@@ -432,7 +426,6 @@ class WorkspacesDisplay extends St.Widget {
         this._syncActualGeometryLater = 0;
 
         this._actualGeometry = null;
-        this._fullGeometry = null;
         this._inWindowDrag = false;
 
         this._gestureActive = false; // touch(pad) gestures
@@ -660,8 +653,6 @@ class WorkspacesDisplay extends St.Widget {
             Main.layoutManager.overviewGroup.add_actor(view);
         }
 
-        if (this._fullGeometry)
-            this._syncWorkspacesFullGeometry();
         if (this._actualGeometry)
             this._syncWorkspacesActualGeometry();
     }
@@ -710,25 +701,6 @@ class WorkspacesDisplay extends St.Widget {
         });
     }
 
-    // This geometry should always be the fullest geometry
-    // the workspaces switcher can ever be allocated, as if
-    // the sliding controls were never slid in at all.
-    setWorkspacesFullGeometry(geom) {
-        this._fullGeometry = geom;
-        this._syncWorkspacesFullGeometry();
-    }
-
-    _syncWorkspacesFullGeometry() {
-        if (!this._workspacesViews.length)
-            return;
-
-        let monitors = Main.layoutManager.monitors;
-        for (let i = 0; i < monitors.length; i++) {
-            let geometry = i == this._primaryIndex ? this._fullGeometry : monitors[i];
-            this._workspacesViews[i].setFullGeometry(geometry);
-        }
-    }
-
     _updateWorkspacesActualGeometry() {
         const [x, y] = this.get_transformed_position();
         const width = this.allocation.get_width();


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