File tree Expand file tree Collapse file tree 3 files changed +15
-12
lines changed
wsmatrix@martin.zurowietz.de Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -7,14 +7,16 @@ export default class WsmatrixExtension extends Extension {
77 let settings = this . getSettings ( ) ;
88 let keybindings = this . getSettings ( this . metadata [ 'keybindings-schema' ] ) ;
99 this . overrideWorkspace = new WorkspaceManagerOverride ( settings , keybindings ) ;
10+ this . overrideWorkspace . enable ( ) ;
1011 this . overrideOverview = new OverviewManager ( settings ) ;
12+ this . overrideOverview . enable ( ) ;
1113 }
1214
1315 disable ( ) {
14- this . overrideWorkspace . destroy ( ) ;
16+ this . overrideWorkspace . disable ( ) ;
1517 this . overrideWorkspace = null ;
1618
17- this . overrideOverview . destroy ( ) ;
19+ this . overrideOverview . disable ( ) ;
1820 this . overrideOverview = null ;
1921 }
2022}
Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ import {PACKAGE_VERSION} from 'resource:///org/gnome/shell/misc/config.js';
88export default class OverviewManager {
99 constructor ( settings ) {
1010 this . _settings = settings ;
11- this . _initOverrides ( )
12- . then ( this . _handleShowOverviewGridChanged . bind ( this ) )
13- . catch ( e => console . error ( e ) ) ;
11+ }
1412
15- // this._handleShowOverviewGridChanged();
13+ async enable ( ) {
1614 this . _connectSettings ( ) ;
15+ await this . _initOverrides ( ) ;
16+ this . _handleShowOverviewGridChanged ( ) ;
1717 }
1818
1919 // This can be moved to the constructor again if there is no need for the conditional
@@ -63,7 +63,7 @@ export default class OverviewManager {
6363 this . _overrides . forEach ( o => o . disable ( ) ) ;
6464 }
6565
66- destroy ( ) {
66+ disable ( ) {
6767 this . restore ( ) ;
6868 this . _disconnectSettings ( ) ;
6969 }
Original file line number Diff line number Diff line change @@ -36,13 +36,14 @@ export default class WorkspaceManagerOverride {
3636 this . _keybindings = keybindings ;
3737 this . _overviewKeybindingActions = { } ;
3838 this . monitors = [ ] ;
39- this . _initOverrides ( )
40- . then ( this . _overrideOriginalProperties . bind ( this ) )
41- . catch ( e => console . error ( e ) ) ;
39+ }
40+
41+ async enable ( ) {
42+ await this . _initOverrides ( )
4243
4344 this . _overrideDynamicWorkspaces ( ) ;
4445 this . _overrideKeybindingHandlers ( ) ;
45- // this._overrideOriginalProperties();
46+ this . _overrideOriginalProperties ( ) ;
4647 this . _handleNumberOfWorkspacesChanged ( ) ;
4748 this . _handleMultiMonitorChanged ( ) ;
4849 this . _handleWraparoundModeChanged ( ) ;
@@ -69,7 +70,7 @@ export default class WorkspaceManagerOverride {
6970 }
7071 }
7172
72- destroy ( ) {
73+ disable ( ) {
7374 this . _destroyWorkspaceSwitcherPopup ( ) ;
7475 this . _restoreLayout ( ) ;
7576 this . _restoreKeybindingHandlers ( ) ;
You can’t perform that action at this time.
0 commit comments