Skip to content

Commit 0562cd1

Browse files
committed
appswitcher: Fix Alt+Shift+Tab (13717)
- Update _show and _keyReleaseEvent to detect 'backward' keybindings. - Adjust _currentIndex calculation to decrement for Alt+Shift+Tab.
1 parent 1c50d51 commit 0562cd1

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

js/ui/appSwitcher/appSwitcher.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,13 @@ AppSwitcher.prototype = {
341341
let state = mods & this._modifierMask;
342342

343343
if (state == 0) {
344-
if (this._initialDelayTimeoutId !== 0)
345-
this._currentIndex = (this._currentIndex + 1) % this._windows.length;
344+
if (this._initialDelayTimeoutId !== 0) {
345+
let name = this._binding ? this._binding.get_name() : '';
346+
if (name.includes('backward'))
347+
this._currentIndex = (this._currentIndex - 1 + this._windows.length) % this._windows.length;
348+
else
349+
this._currentIndex = (this._currentIndex + 1) % this._windows.length;
350+
}
346351
this._activateSelected();
347352
}
348353

js/ui/appSwitcher/classicSwitcher.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,12 @@ ClassicSwitcher.prototype = {
142142

143143
this.actor.opacity = 255;
144144
this._initialDelayTimeoutId = 0;
145-
this._next();
145+
146+
let name = this._binding ? this._binding.get_name() : '';
147+
if (name.includes('backward'))
148+
this._previous();
149+
else
150+
this._next();
146151
},
147152

148153
_hide: function() {

0 commit comments

Comments
 (0)