[gnome-shell-extensions] window-list: Do not add sticky windows more than once



commit 191c7ccc24d609fa7d9c63fe2c27b74566c274a4
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Sep 11 10:54:33 2014 +0200

    window-list: Do not add sticky windows more than once
    
    When a window's on-all-workspaces property changes to true, the
    workspaces the window was not located on will emit the ::window-added
    signal for the window; however we don't want multiple buttons for
    the same window, so filter out the extra calls.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736398

 extensions/window-list/extension.js |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index 82f48f5..244664d 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -983,6 +983,12 @@ const WindowList = new Lang.Class({
         if (this._grouped)
             return;
 
+        let children = this._windowList.get_children();
+        for (let i = 0; i < children.length; i++) {
+            if (children[i]._delegate.metaWindow == win)
+                return;
+        }
+
         let button = new WindowButton(win);
         this._windowList.layout_manager.pack(button.actor,
                                              true, true, true,


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