altTab: Update the switcher when apps and/or windows get stopped/closed

Make sure that the items from the applications switcher and the windows
switcher are removed when the related applications get stopped, or some
of the associated windows closed.

https://bugzilla.gnome.org/show_bug.cgi?id=620106
This commit is contained in:
Florian Müllner
2018-02-08 10:38:04 +00:00
committed by Florian Müllner
parent f2d12e22b5
commit 5122b06839
2 changed files with 71 additions and 6 deletions

View File

@@ -418,6 +418,11 @@ var SwitcherList = new Lang.Class({
return bbox;
},
removeItem: function(index) {
let item = this._items.splice(index, 1);
item[0].destroy();
},
_onItemClicked: function (index) {
this._itemActivated(index);
},
@@ -432,7 +437,7 @@ var SwitcherList = new Lang.Class({
},
highlight: function(index, justOutline) {
if (this._highlighted != -1) {
if (this._items[this._highlighted]) {
this._items[this._highlighted].remove_style_pseudo_class('outlined');
this._items[this._highlighted].remove_style_pseudo_class('selected');
}