diff --git a/js/ui/altTab.js b/js/ui/altTab.js index 0130fa245..12b784939 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -365,8 +365,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup { }, }); this._thumbnails = null; - if (this._switcherList._items[this._selectedIndex]) - this._switcherList._items[this._selectedIndex].remove_accessible_state(Atk.StateType.EXPANDED); + this._switcherList.removeAccessibleState(this._selectedIndex, Atk.StateType.EXPANDED); } _createThumbnails() { @@ -395,7 +394,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup { }, }); - this._switcherList._items[this._selectedIndex].add_accessible_state(Atk.StateType.EXPANDED); + this._switcherList.addAccessibleState(this._selectedIndex, Atk.StateType.EXPANDED); } }); diff --git a/js/ui/switcherPopup.js b/js/ui/switcherPopup.js index 5f2839cf2..46a4b158a 100644 --- a/js/ui/switcherPopup.js +++ b/js/ui/switcherPopup.js @@ -444,6 +444,14 @@ var SwitcherList = GObject.registerClass({ this.emit('item-removed', index); } + addAccessibleState(index, state) { + this._items[index].add_accessible_state(state); + } + + removeAccessibleState(index, state) { + this._items[index].remove_accessible_state(state); + } + _onItemClicked(index) { this._itemActivated(index); }