[gnome-shell-extensions] window-list: Honor changes in skip-taskbar property



commit b65f362f0d65b54a155eda78da773b0369d23669
Author: Sergio Costas <raster rastersoft com>
Date:   Sat Oct 3 15:12:24 2020 +0200

    window-list: Honor changes in skip-taskbar property
    
    Although window-list checks the 'skip-taskbar' property when a
    window is added to the desktop to decide wether it should be
    shown in the bar or not, it doesn't honor that when the property
    is changed after a window has already been added. Since the new
    WaylandClient API allows to change this property for already
    mapped windows, supporting this is a good idea.
    
    This patch fixes this.
    
    Fix https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/130

 extensions/window-list/extension.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index 523ffb2..3c45d00 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -352,6 +352,9 @@ class WindowButton extends BaseButton {
         super._init(perMonitor, monitorIndex);
 
         this.metaWindow = metaWindow;
+        this._skipTaskbarId = metaWindow.connect('notify::skip-taskbar', () => {
+            this._updateVisibility();
+        });
         this._updateVisibility();
 
         this._windowTitle = new WindowTitle(this.metaWindow);
@@ -412,6 +415,7 @@ class WindowButton extends BaseButton {
 
     _onDestroy() {
         super._onDestroy();
+        this.metaWindow.disconnect(this._skipTaskbarId);
         this.metaWindow.disconnect(this._workspaceChangedId);
         global.display.disconnect(this._notifyFocusId);
         this._contextMenu.destroy();
@@ -948,9 +952,6 @@ class WindowList extends St.Widget {
     }
 
     _onWindowAdded(ws, win) {
-        if (win.skip_taskbar)
-            return;
-
         if (!this._grouped)
             this._checkGrouping();
 


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