From 56c2c57e594a3c9c087672c975c6c852bc06cd57 Mon Sep 17 00:00:00 2001 From: rpm-build Date: Jan 29 2021 22:14:47 +0000 Subject: 0001-dashToDock-Handle-no-overview-case.patch patch_name: 0001-dashToDock-Handle-no-overview-case.patch present_in_specfile: true location_in_specfile: 9 --- diff --git a/extensions/dash-to-dock/docking.js b/extensions/dash-to-dock/docking.js index d35094b..2b8353a 100644 --- a/extensions/dash-to-dock/docking.js +++ b/extensions/dash-to-dock/docking.js @@ -233,7 +233,7 @@ var DockedDash = class DashToDock { // Create a new dash object this.dash = new MyDash.MyDash(this._settings, this._remoteModel, this._monitorIndex); - if (!this._settings.get_boolean('show-show-apps-button')) + if (Main.overview.isDummy || !this._settings.get_boolean('show-show-apps-button')) this.dash.hideShowAppsButton(); // Create the main actor and the containers for sliding in and out and @@ -272,46 +272,12 @@ var DockedDash = class DashToDock { this.dash.actor.add_constraint(this.constrainSize); this._signalsHandler.add([ - Main.overview, - 'item-drag-begin', - this._onDragStart.bind(this) - ], [ - Main.overview, - 'item-drag-end', - this._onDragEnd.bind(this) - ], [ - Main.overview, - 'item-drag-cancelled', - this._onDragEnd.bind(this) - ], [ // update when workarea changes, for instance if other extensions modify the struts //(like moving th panel at the bottom) global.display, 'workareas-changed', this._resetPosition.bind(this) ], [ - Main.overview, - 'showing', - this._onOverviewShowing.bind(this) - ], [ - Main.overview, - 'hiding', - this._onOverviewHiding.bind(this) - ], [ - // Hide on appview - Main.overview.viewSelector, - 'page-changed', - this._pageChanged.bind(this) - ], [ - Main.overview.viewSelector, - 'page-empty', - this._onPageEmpty.bind(this) - ], [ - // Ensure the ShowAppsButton status is kept in sync - Main.overview.viewSelector._showAppsButton, - 'notify::checked', - this._syncShowAppsButtonToggled.bind(this) - ], [ global.display, 'in-fullscreen-changed', this._updateBarrier.bind(this) @@ -326,21 +292,59 @@ var DockedDash = class DashToDock { 'icon-size-changed', () => { Main.overview.dashIconSize = this.dash.iconSize; } ], [ - // This duplicate the similar signal which is in owerview.js. - // Being connected and thus executed later this effectively - // overwrite any attempt to use the size of the default dash - //which given the customization is usually much smaller. - // I can't easily disconnect the original signal - Main.overview._controls.dash, - 'icon-size-changed', - () => { Main.overview.dashIconSize = this.dash.iconSize; } - ], [ // sync hover after a popupmenu is closed this.dash, 'menu-closed', () => { this._box.sync_hover() } ]); + if (!Main.overview.isDummy) { + this._signalsHandler.add([ + Main.overview, + 'item-drag-begin', + this._onDragStart.bind(this) + ], [ + Main.overview, + 'item-drag-end', + this._onDragEnd.bind(this) + ], [ + Main.overview, + 'item-drag-cancelled', + this._onDragEnd.bind(this) + ], [ + Main.overview, + 'showing', + this._onOverviewShowing.bind(this) + ], [ + Main.overview, + 'hiding', + this._onOverviewHiding.bind(this) + ], [ + // Hide on appview + Main.overview.viewSelector, + 'page-changed', + this._pageChanged.bind(this) + ], [ + Main.overview.viewSelector, + 'page-empty', + this._onPageEmpty.bind(this) + ], [ + // Ensure the ShowAppsButton status is kept in sync + Main.overview.viewSelector._showAppsButton, + 'notify::checked', + this._syncShowAppsButtonToggled.bind(this) + ], [ + // This duplicate the similar signal which is in owerview.js. + // Being connected and thus executed later this effectively + // overwrite any attempt to use the size of the default dash + //which given the customization is usually much smaller. + // I can't easily disconnect the original signal + Main.overview._controls.dash, + 'icon-size-changed', + () => { Main.overview.dashIconSize = this.dash.iconSize; } + ]); + } + this._injectionsHandler = new Utils.InjectionsHandler(); this._themeManager = new Theming.ThemeManager(this._settings, this); @@ -370,14 +374,17 @@ var DockedDash = class DashToDock { this._dashSpacer = new OverviewControls.DashSpacer(); this._dashSpacer.setDashActor(this._box); - if (this._position == St.Side.LEFT) - Main.overview._controls._group.insert_child_at_index(this._dashSpacer, this._rtl ? -1 : 0); // insert on first - else if (this._position == St.Side.RIGHT) - Main.overview._controls._group.insert_child_at_index(this._dashSpacer, this._rtl ? 0 : -1); // insert on last - else if (this._position == St.Side.TOP) - Main.overview._overview.insert_child_at_index(this._dashSpacer, 0); - else if (this._position == St.Side.BOTTOM) - Main.overview._overview.insert_child_at_index(this._dashSpacer, -1); + if (!Main.overview.isDummy) { + const { _controls, _overview } = Main.overview; + if (this._position == St.Side.LEFT) + _controls._group.insert_child_at_index(this._dashSpacer, this._rtl ? -1 : 0); // insert on first + else if (this._position == St.Side.RIGHT) + _controls._group.insert_child_at_index(this._dashSpacer, this._rtl ? 0 : -1); // insert on last + else if (this._position == St.Side.TOP) + _overview.insert_child_at_index(this._dashSpacer, 0); + else if (this._position == St.Side.BOTTOM) + _overview.insert_child_at_index(this._dashSpacer, -1); + } // Add dash container actor and the container to the Chrome. this.actor.set_child(this._slider); @@ -412,7 +419,7 @@ var DockedDash = class DashToDock { // Since Gnome 3.8 dragging an app without having opened the overview before cause the attemp to //animate a null target since some variables are not initialized when the viewSelector is created - if (Main.overview.viewSelector._activePage == null) + if (!Main.overview.isDummy && Main.overview.viewSelector._activePage == null) Main.overview.viewSelector._activePage = Main.overview.viewSelector._workspacesPage; this._updateVisibilityMode(); @@ -493,7 +500,8 @@ var DockedDash = class DashToDock { this._settings, 'changed::show-show-apps-button', () => { - if (this._settings.get_boolean('show-show-apps-button')) + if (!Main.overview.isDummy && + this._settings.get_boolean('show-show-apps-button')) this.dash.showShowAppsButton(); else this.dash.hideShowAppsButton(); @@ -1681,6 +1689,9 @@ var DockManager = class DashToDock_DockManager { // set stored icon size to the new dash Main.overview.dashIconSize = this._allDocks[0].dash.iconSize; + if (Main.overview.isDummy) + return; + // Hide usual Dash Main.overview._controls.dash.actor.hide(); @@ -1707,6 +1718,9 @@ var DockManager = class DashToDock_DockManager { } _restoreDash() { + if (Main.overview.isDummy) + return; + Main.overview._controls.dash.actor.show(); Main.overview._controls.dash.actor.set_width(-1); //reset default dash size // This force the recalculation of the icon size