This commit is contained in:
Hirnmoder
2024-10-28 07:50:27 +01:00
3 changed files with 10 additions and 5 deletions

View File

@@ -99,7 +99,8 @@ export default class DashToPanelExtension extends Extension {
function _enable(extension) {
extensionSystem.disableExtension(UBUNTU_DOCK_UUID);
if (panelManager) return; //already initialized
if (panelManager)
return panelManager.toggleDash(); // already initialized but ubuntu dock restored the original dash on disable
SETTINGS = extension.getSettings('org.gnome.shell.extensions.dash-to-panel');
DESKTOPSETTINGS = new Gio.Settings({schema_id: 'org.gnome.desktop.interface'});

View File

@@ -64,7 +64,7 @@ export const Overview = class {
this._optionalNumberOverlay();
this._optionalClickToExit();
this._toggleDash();
this.toggleDash();
this._adaptAlloc();
this._signalsHandler.add([
@@ -73,7 +73,7 @@ export const Overview = class {
'changed::stockgs-keep-dash',
'changed::panel-sizes'
],
() => this._toggleDash()
() => this.toggleDash()
]);
}
@@ -83,7 +83,7 @@ export const Overview = class {
this._timeoutsHandler.destroy();
this._injectionManager.clear();
this._toggleDash(true);
this.toggleDash(true);
// Remove key bindings
this._disableHotKeys();
@@ -91,7 +91,7 @@ export const Overview = class {
this._disableClickToExit();
}
_toggleDash(visible) {
toggleDash(visible) {
if (visible === undefined) {
visible = SETTINGS.get_boolean('stockgs-keep-dash');
}

View File

@@ -296,6 +296,10 @@ export const PanelManager = class {
this._desktopIconsUsableArea = null;
}
toggleDash() {
this.overview.toggleDash();
}
_setDesktopIconsMargins() {
this._desktopIconsUsableArea?.resetMargins();
this.allPanels.forEach(p => {