diff options
Diffstat (limited to 'extensions/45/no-overview/extension.js')
-rw-r--r-- | extensions/45/no-overview/extension.js | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/extensions/45/no-overview/extension.js b/extensions/45/no-overview/extension.js index 63c914a..f0a6f28 100644 --- a/extensions/45/no-overview/extension.js +++ b/extensions/45/no-overview/extension.js @@ -1,32 +1,26 @@ /* No overview at start-up GNOME Shell 45+ extension - Contributors: @fthx, @fmuellner + Contributors: @fthx License: GPL v3 */ - import * as Main from 'resource:///org/gnome/shell/ui/main.js'; export default class NoOverviewExtension { - constructor() { - this._realHasOverview = Main.sessionMode.hasOverview; - } - enable() { if (!Main.layoutManager._startingUp) { return; } - Main.sessionMode.hasOverview = false; - - this._startup_complete = Main.layoutManager.connect('startup-complete', () => { - Main.sessionMode.hasOverview = this._realHasOverview; - }); + Main.layoutManager.connectObject( + 'startup-complete', + () => Main.overview.hide(), + this + ); } disable() { - Main.sessionMode.hasOverview = this._realHasOverview; - Main.layoutManager.disconnect(this._startup_complete); + Main.layoutManager.disconnectObject(this); } } |