From 191c7ccc24d609fa7d9c63fe2c27b74566c274a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 11 Sep 2014 10:54:33 +0200 Subject: [PATCH] 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 file changed, 6 insertions(+) diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js index 82f48f54..244664d8 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,