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
This commit is contained in:
Florian Müllner
2014-09-11 10:54:33 +02:00
parent f77e38e771
commit 191c7ccc24

View File

@@ -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,