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



commit 1b1e29722081427e56b4209843a6881ede6bba82
Author: Sergio Costas <raster rastersoft com>
Date:   Sat Oct 3 13:12:24 2020 +0000

    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
    
    
    (cherry picked from commit b65f362f0d65b54a155eda78da773b0369d23669)

 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 2c9dcf4..b7d9318 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -353,6 +353,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);
@@ -413,6 +416,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();
@@ -954,9 +958,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]