From 63dcc06bf83a178012909a708babedb71eeebd9a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 10 Dec 2023 15:37:46 +0100 Subject: Merging upstream version 20231210. Signed-off-by: Daniel Baumann --- extensions/44/no-overview/extension.js | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 extensions/44/no-overview/extension.js (limited to 'extensions/44/no-overview/extension.js') diff --git a/extensions/44/no-overview/extension.js b/extensions/44/no-overview/extension.js new file mode 100644 index 0000000..32a9090 --- /dev/null +++ b/extensions/44/no-overview/extension.js @@ -0,0 +1,38 @@ +/* + No overview at start-up + Contributors: @fthx, @fmuellner + License: GPL v3 +*/ + + +const Main = imports.ui.main; + + +class Extension { + constructor() { + this._realHasOverview = Main.sessionMode.hasOverview; + } + + enable() { + if (!Main.layoutManager._startingUp) { + return; + } + + Main.sessionMode.hasOverview = false; + Main.layoutManager.connect('startup-complete', () => { + Main.sessionMode.hasOverview = this._realHasOverview + }); + // handle Ubuntu's method + if (Main.layoutManager.startInOverview) { + Main.layoutManager.startInOverview = false; + } + } + + disable() { + Main.sessionMode.hasOverview = this._realHasOverview; + } +} + +function init() { + return new Extension(); +} \ No newline at end of file -- cgit v1.2.3