Fix hide-overview-on-startup on GNOME 50

This commit is contained in:
2026-03-05 20:20:03 +09:00
parent ebf64ab50b
commit f99b879f88

View File

@@ -61,6 +61,18 @@ export default class DashToPanelExtension extends Extension {
async enable() { async enable() {
DTP_EXTENSION = this DTP_EXTENSION = this
SETTINGS = this.getSettings('org.gnome.shell.extensions.dash-to-panel') SETTINGS = this.getSettings('org.gnome.shell.extensions.dash-to-panel')
if (
SETTINGS.get_boolean('hide-overview-on-startup') &&
Main.layoutManager._startingUp
) {
Main.sessionMode.hasOverview = false
startupCompleteHandler = Main.layoutManager.connect(
'startup-complete',
() => (Main.sessionMode.hasOverview = this._realHasOverview),
)
}
DESKTOPSETTINGS = new Gio.Settings({ DESKTOPSETTINGS = new Gio.Settings({
schema_id: 'org.gnome.desktop.interface', schema_id: 'org.gnome.desktop.interface',
}) })
@@ -107,21 +119,6 @@ export default class DashToPanelExtension extends Extension {
SETTINGS.set_int('extension-version', this.metadata.version) SETTINGS.set_int('extension-version', this.metadata.version)
} }
Main.layoutManager.startInOverview = !SETTINGS.get_boolean(
'hide-overview-on-startup',
)
if (
SETTINGS.get_boolean('hide-overview-on-startup') &&
Main.layoutManager._startingUp
) {
Main.sessionMode.hasOverview = false
startupCompleteHandler = Main.layoutManager.connect(
'startup-complete',
() => (Main.sessionMode.hasOverview = this._realHasOverview),
)
}
this.enableGlobalStyles() this.enableGlobalStyles()
let completeEnable = () => { let completeEnable = () => {