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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user