@@ -21,17 +21,20 @@ const altTab = imports.ui.altTab;
2121
2222let CurrentMonitorWindowSwitcherPopup ;
2323let CurrentMonitorAppSwitcherPopup ;
24+ let CurrentWindowCyclerPopup ;
2425let extension = null ;
2526
2627class Extension {
2728 constructor ( ) {
2829 this . origMethods = {
29- "windowSwitcherPopup" : altTab . WindowSwitcherPopup ,
30- "appSwitcherPopup" : altTab . AppSwitcherPopup
30+ windowSwitcherPopup : altTab . WindowSwitcherPopup ,
31+ appSwitcherPopup : altTab . AppSwitcherPopup ,
32+ WindowCyclerPopup : altTab . WindowCyclerPopup ,
3133 } ;
3234
33- altTab . WindowSwitcherPopup = CurrentMonitorWindowSwitcherPopup ;
35+ altTab . WindowSwitcherPopup = CurrentMonitorWindowSwitcherPopup ;
3436 altTab . AppSwitcherPopup = CurrentMonitorAppSwitcherPopup ;
37+ altTab . WindowCyclerPopup = CurrentWindowCyclerPopup ;
3538
3639 const seat = Clutter . get_default_backend ( ) . get_default_seat ( ) ;
3740 this . vdevice = seat . create_virtual_device (
@@ -45,20 +48,22 @@ class Extension {
4548 }
4649
4750 destroy ( ) {
48- altTab . WindowSwitcherPopup = this . origMethods [ "windowSwitcherPopup" ] ;
51+ altTab . WindowSwitcherPopup = this . origMethods [ "windowSwitcherPopup" ] ;
4952 altTab . AppSwitcherPopup = this . origMethods [ "appSwitcherPopup" ] ;
5053 }
5154}
5255
5356function init ( ) {
54- CurrentMonitorWindowSwitcherPopup = GObject . registerClass (
55- class CurrentMonitorWindowSwitcherPopup extends altTab . WindowSwitcherPopup {
56- _finish ( ) {
57- extension . movePointer ( ) ;
58- super . _finish ( ) ;
59- }
60- }
61- ) ;
57+ // Fix for Alt+Tab (switch windows)
58+ CurrentMonitorWindowSwitcherPopup = GObject . registerClass (
59+ class CurrentMonitorWindowSwitcherPopup extends altTab . WindowSwitcherPopup {
60+ _finish ( ) {
61+ extension . movePointer ( ) ;
62+ super . _finish ( ) ;
63+ }
64+ }
65+ ) ;
66+ // Fix for Super+Tab (switch applications)
6267 CurrentMonitorAppSwitcherPopup = GObject . registerClass (
6368 class CurrentMonitorAppSwitcherPopup extends altTab . AppSwitcherPopup {
6469 _finish ( timestamp ) {
@@ -68,7 +73,16 @@ function init() {
6873 super . _finish ( timestamp ) ;
6974 }
7075 }
71- ) ;
76+ ) ;
77+ // Fix for Alt+Escape (switch windows directly)
78+ CurrentWindowCyclerPopup = GObject . registerClass (
79+ class CurrentWindowCyclerPopup extends altTab . WindowCyclerPopup {
80+ _finish ( ) {
81+ extension . movePointer ( ) ;
82+ super . _finish ( ) ;
83+ }
84+ }
85+ ) ;
7286}
7387
7488function enable ( ) {
0 commit comments