[gnome-shell] workspaceThumbnails: Immediately initialize should-show



commit 4eb31e4e18bb6861383e9a78c244a356e854682a
Author: Florian Müllner <fmuellner gnome org>
Date:   Sun Feb 21 00:23:07 2021 +0100

    workspaceThumbnails: Immediately initialize should-show
    
    At the moment, we only get the initial :should-show value when populating
    the thumbnails. That only happens when entering the overview, so any
    listeners to notify::should-show will perceive it as a change rather
    than an initialization, which can result in unwanted transitions.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1735>

 js/ui/workspaceThumbnail.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index fb25f6cb1f..e54e8ab1d3 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -684,6 +684,7 @@ var ThumbnailsBox = GObject.registerClass({
         this._settings = new Gio.Settings({ schema_id: MUTTER_SCHEMA });
         this._settings.connect('changed::dynamic-workspaces',
             () => this._updateShouldShow());
+        this._updateShouldShow();
 
         this._monitorsChangedId =
             Main.layoutManager.connect('monitors-changed', () => {
@@ -1010,8 +1011,6 @@ var ThumbnailsBox = GObject.registerClass({
             this._stateCounts[ThumbnailState[key]] = 0;
 
         this.addThumbnails(0, workspaceManager.n_workspaces);
-
-        this._updateShouldShow();
     }
 
     _destroyThumbnails() {


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