From 2e5a7d93476c0819b5a23f5740e4c843eaedc73a Mon Sep 17 00:00:00 2001 From: Nippy Date: Mon, 1 Jun 2026 18:57:29 +0200 Subject: Raveos gnome update --- .../dash-to-dock@micxgx.gmail.com/appIcons.js | 15 +- .../appIconsDecorator.js | 61 +++--- .../dash-to-dock@micxgx.gmail.com/dash.js | 56 ++++-- .../dash-to-dock@micxgx.gmail.com/docking.js | 208 ++++++++++----------- .../dash-to-dock@micxgx.gmail.com/extension.js | 1 + .../dash-to-dock@micxgx.gmail.com/intellihide.js | 13 +- .../dash-to-dock@micxgx.gmail.com/launcherAPI.js | 4 +- .../locale/cs/LC_MESSAGES/dashtodock.mo | Bin 10315 -> 13925 bytes .../locale/pl/LC_MESSAGES/dashtodock.mo | Bin 10837 -> 10904 bytes .../locale/pt_BR/LC_MESSAGES/dashtodock.mo | Bin 11998 -> 14431 bytes .../dash-to-dock@micxgx.gmail.com/metadata.json | 2 +- .../dash-to-dock@micxgx.gmail.com/theming.js | 42 +++-- 12 files changed, 232 insertions(+), 170 deletions(-) (limited to 'raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com') diff --git a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/appIcons.js b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/appIcons.js index 6b0ac24..cb86627 100644 --- a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/appIcons.js +++ b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/appIcons.js @@ -93,7 +93,7 @@ let recentlyClickedAppMonitor = -1; * - Update minimization animation target * - Update menu if open on windows change */ -const DockAbstractAppIcon = GObject.registerClass({ +export const DockAbstractAppIcon = GObject.registerClass({ GTypeFlags: GObject.TypeFlags.ABSTRACT, Properties: { 'focused': GObject.ParamSpec.boolean( @@ -429,6 +429,14 @@ const DockAbstractAppIcon = GObject.registerClass({ // it called by the parent constructor. } + notifyAppIconUpdating(monitorIndex) { + const icon = Gio.Icon.new_for_string('action-unavailable-symbolic'); + const {osdWindowManager} = Main; + const showOsd = osdWindowManager.showOne ?? osdWindowManager.show; + showOsd.call(osdWindowManager, monitorIndex ?? this.monitorIndex, icon, + _('%s is updating, try again later').format(this.name), null); + } + popupMenu() { this._removeMenuTimeout?.(); this.fake_release(); @@ -754,10 +762,7 @@ const DockAbstractAppIcon = GObject.registerClass({ // the existing window instead. launchNewWindow() { if (this.updating) { - const icon = Gio.Icon.new_for_string('action-unavailable-symbolic'); - Main.osdWindowManager.show(-1, icon, - _('%s is updating, try again later').format(this.name), - null); + this.notifyAppIconUpdating(); return; } diff --git a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/appIconsDecorator.js b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/appIconsDecorator.js index 89afa3e..ac400fc 100644 --- a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/appIconsDecorator.js +++ b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/appIconsDecorator.js @@ -2,15 +2,12 @@ import { - Docking, AppIconIndicators, + AppIcons, + Docking, Utils, } from './imports.js'; -import { - Gio, -} from './dependencies/gi.js'; - import { AppMenu, AppDisplay, @@ -19,7 +16,7 @@ import { } from './dependencies/shell/ui.js'; const Labels = Object.freeze({ - GENERIC: Symbol('generic'), + RESULTS: Symbol('results'), ICONS: Symbol('icons'), }); @@ -30,6 +27,8 @@ export class AppIconsDecorator { this._propertyInjections = new Utils.PropertyInjectionsHandler( null, {allowNewProperty: true}); this._indicators = new Set(); + this._resultIndicators = new Set(); + this._updatingIcons = new WeakSet(); this._patchAppIcons(); this._decorateIcons(); @@ -42,28 +41,42 @@ export class AppIconsDecorator { delete this._methodInjections; this._propertyInjections?.destroy(); delete this._propertyInjections; - this._indicators?.forEach(i => i.destroy()); - this._indicators?.clear(); + this._clearIndicators(Labels.ICONS); + this._clearIndicators(Labels.RESULTS); delete this._indicators; + delete this._resultIndicators; + delete this._updatingIcons; + } + + _indicatorsSet(label) { + return { + [Labels.ICONS]: this._indicators, + [Labels.RESULTS]: this._resultIndicators, + }[label]; + } + + _clearIndicators(label) { + const indicatorsSet = this._indicatorsSet(label); + indicatorsSet.forEach(i => i.destroy()); + indicatorsSet.clear(); } - _decorateIcon(parentIcon, signalLabel = Labels.GENERIC) { + _decorateIcon(parentIcon, signalLabel) { const indicator = new AppIconIndicators.UnityIndicator(parentIcon); - this._indicators.add(indicator); + const indicatorsSet = this._indicatorsSet(signalLabel); + indicatorsSet.add(indicator); this._signals.addWithLabel(signalLabel, parentIcon, 'destroy', () => { - this._indicators.delete(indicator); + indicatorsSet.delete(indicator); indicator.destroy(); }); - return indicator; } _decorateIcons() { const {appDisplay} = Docking.DockManager.getDefault().overviewControls; const decorateAppIcons = () => { - this._indicators.forEach(i => i.destroy()); - this._indicators.clear(); this._signals.removeWithLabel(Labels.ICONS); + this._clearIndicators(Labels.ICONS); const decorateViewIcons = view => { const items = view.getAllItems(); @@ -92,7 +105,7 @@ export class AppIconsDecorator { /* eslint-disable no-invalid-this */ const result = originalFunction.call(this, ...args); if (result instanceof AppDisplay.AppIcon) - self._decorateIcon(result); + self._decorateIcon(result, Labels.RESULTS); return result; /* eslint-enable no-invalid-this */ }); @@ -101,10 +114,9 @@ export class AppIconsDecorator { 'activate', function (originalFunction, ...args) { /* eslint-disable no-invalid-this */ if (this.updating) { - const icon = Gio.Icon.new_for_string('action-unavailable-symbolic'); - Main.osdWindowManager.show(-1, icon, - _('%s is updating, try again later').format(this.name), - null); + const {notifyAppIconUpdating} = AppIcons.DockAbstractAppIcon.prototype; + notifyAppIconUpdating.call(this, + Main.layoutManager.primaryMonitor.index); return; } @@ -119,16 +131,19 @@ export class AppIconsDecorator { appIconsTypes.forEach(type => this._propertyInjections.add(type.prototype, 'updating', { get() { - return !!this.__d2dUpdating; + return self._updatingIcons.has(this); }, set(updating) { if (this.updating === updating) return; - this.__d2dUpdating = updating; - if (updating) + + if (updating) { + self._updatingIcons.add(this); this.add_style_class_name('updating'); - else + } else { + self._updatingIcons.delete(this); this.remove_style_class_name('updating'); + } }, })); diff --git a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/dash.js b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/dash.js index 956bbeb..a650f38 100644 --- a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/dash.js +++ b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/dash.js @@ -17,6 +17,7 @@ import { } from './dependencies/shell/ui.js'; import { + Config, Util, } from './dependencies/shell/misc.js'; @@ -120,6 +121,14 @@ export const DockDash = GObject.registerClass({ 'requires-visibility', 'requires-visibility', 'requires-visibility', GObject.ParamFlags.READWRITE, false), + 'max-width': GObject.ParamSpec.int( + 'max-width', 'max-width', 'max-width', + GObject.ParamFlags.READWRITE, + -1, GLib.MAXINT32, -1), + 'max-height': GObject.ParamSpec.int( + 'max-height', 'max-height', 'max-height', + GObject.ParamFlags.READWRITE, + -1, GLib.MAXINT32, -1), }, Signals: { 'menu-opened': {}, @@ -1056,6 +1065,22 @@ export const DockDash = GObject.registerClass({ this._showAppsIcon.visible = false; } + get maxWidth() { + return this._maxWidth; + } + + get maxHeight() { + return this._maxHeight; + } + + set maxWidth(maxWidth) { + this.setMaxSize(maxWidth, this._maxHeight); + } + + set maxHeight(maxHeight) { + this.setMaxSize(this._maxWidth, maxHeight); + } + setMaxSize(maxWidth, maxHeight) { if (this._maxWidth === maxWidth && this._maxHeight === maxHeight) @@ -1074,10 +1099,13 @@ export const DockDash = GObject.registerClass({ const notifiedProperties = []; const showAppsContainer = settings.showAppsAlwaysInTheEdge || !settings.dockExtended ? this._dashContainer : this._boxContainer; + const needsFirstLastChildWorkaround = Config.PACKAGE_VERSION.split('.')[0] < 49; - this._signalsHandler.addWithLabel(Labels.FIRST_LAST_CHILD_WORKAROUND, - showAppsContainer, 'notify', - (_obj, pspec) => notifiedProperties.push(pspec.name)); + if (needsFirstLastChildWorkaround) { + this._signalsHandler.addWithLabel(Labels.FIRST_LAST_CHILD_WORKAROUND, + showAppsContainer, 'notify', + (_obj, pspec) => notifiedProperties.push(pspec.name)); + } if (this._showAppsIcon.get_parent() !== showAppsContainer) { this._showAppsIcon.get_parent()?.remove_child(this._showAppsIcon); @@ -1092,16 +1120,18 @@ export const DockDash = GObject.registerClass({ showAppsContainer.set_child_above_sibling(this._showAppsIcon, null); } - this._signalsHandler.removeWithLabel(Labels.FIRST_LAST_CHILD_WORKAROUND); - - // This is indeed ugly, but we need to ensure that the last and first - // visible widgets are re-computed by St, that is buggy because of a - // mutter issue that is being fixed: - // https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2047 - if (!notifiedProperties.includes('first-child')) - showAppsContainer.notify('first-child'); - if (!notifiedProperties.includes('last-child')) - showAppsContainer.notify('last-child'); + if (needsFirstLastChildWorkaround) { + this._signalsHandler.removeWithLabel(Labels.FIRST_LAST_CHILD_WORKAROUND); + + // This is indeed ugly, but we need to ensure that the last and first + // visible widgets are re-computed by St, that is buggy because of a + // mutter issue that is being fixed: + // https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2047 + if (!notifiedProperties.includes('first-child')) + showAppsContainer.notify('first-child'); + if (!notifiedProperties.includes('last-child')) + showAppsContainer.notify('last-child'); + } } }); diff --git a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/docking.js b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/docking.js index 393b1de..b0d699f 100644 --- a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/docking.js +++ b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/docking.js @@ -231,12 +231,6 @@ const DockedDash = GObject.registerClass({ style_class: Theming.PositionStyleClass[this._position], }); - if (this.monitorIndex === undefined) { - // Hello turkish locale, gjs has instead defined this.monitorIndex - // See: https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/742 - this.monitorIndex = this.monitor_index; - } - this._rtl = Clutter.get_default_text_direction() === Clutter.TextDirection.RTL; // Load settings @@ -400,42 +394,35 @@ const DockedDash = GObject.registerClass({ // Load optional features that need to be activated once per dock this._optionalScrollWorkspaceSwitch(); - // Delay operations that require the shell to be fully loaded and with - // user theme applied. - - this._signalsHandler.addWithLabel(Labels.INITIALIZE, global.stage, - 'after-paint', () => this._initialize()); - // Add dash container actor and the container to the Chrome. this.set_child(this._slider); this._slider.set_child(this._box); this._box.add_child(this.dash); - // Add aligning container without tracking it for input region - this._trackDock(); - - // Create and apply height/width constraint to the dash. - if (this._isHorizontal) { - this.connect('notify::width', () => { - this.dash.setMaxSize(this.width, this.height); - }); + // Delay operations that require the shell to be fully loaded and with + // user theme applied. + if (Main.layoutManager._startingUp) { + this._signalsHandler.addWithLabel(Labels.STARTUP_ANIMATION, + Main.layoutManager, 'startup-complete', () => { + this._signalsHandler.removeWithLabel(Labels.STARTUP_ANIMATION); + this._trackDock(); + this._initialize(); + }); } else { - this.connect('notify::height', () => { - this.dash.setMaxSize(this.width, this.height); - }); - } - - if (this._position === St.Side.RIGHT) { - this.connect('notify::width', () => - (this.translation_x = -this.width)); - } else if (this._position === St.Side.BOTTOM) { - this.connect('notify::height', () => - (this.translation_y = -this.height)); + this._trackDock(); + // Show the dock only once fully initialized. This workarounds a + // resize glitch we are seeing if the dock is initialized without + // an animation. + // $SOMETHING seems to resize it, but it's yet unclear what it is. + this.opacity = 0; + this._signalsHandler.addWithLabel(Labels.INITIALIZE, global.stage, + 'after-paint', () => { + this._signalsHandler.removeWithLabel(Labels.INITIALIZE); + this._initialize(); + this.opacity = 255; + }); } - // Set initial position - this._resetPosition(); - this.connect('destroy', this._onDestroy.bind(this)); } @@ -464,13 +451,30 @@ const DockedDash = GObject.registerClass({ Main.layoutManager.removeChrome(this); Main.layoutManager.addChrome(this); } + + // Set the initial position. + this._resetPosition(); } _initialize() { - this._signalsHandler.removeWithLabel(Labels.INITIALIZE); + // Create and apply height/width constraint to the dash. + if (this._isHorizontal) { + this.bind_property('width', this.dash, 'max-width', + GObject.BindingFlags.SYNC_CREATE); + } else { + this.bind_property('height', this.dash, 'max-height', + GObject.BindingFlags.SYNC_CREATE); + } - // Apply custom css class according to the settings - this._themeManager.updateCustomTheme(); + if (this._position === St.Side.RIGHT) { + this.translation_x = -this.width; + this.connect('notify::width', () => + (this.translation_x = -this.width)); + } else if (this._position === St.Side.BOTTOM) { + this.translation_y = -this.height; + this.connect('notify::height', () => + (this.translation_y = -this.height)); + } this._updateVisibilityMode(); @@ -612,7 +616,6 @@ const DockedDash = GObject.registerClass({ this._untrackDock(); this._trackDock(); - this._resetPosition(); this._updateAutoHideBarriers(); this._updateVisibilityMode(); }, @@ -1281,7 +1284,9 @@ const DockedDash = GObject.registerClass({ /** * Show dock and give key focus to it */ - _onAccessibilityFocus() { + _onAccessibilityFocus(timestamp) { + if (!Main.overview.visible) + global.display.unset_input_focus(timestamp); this._box.navigate_focus(null, St.DirectionType.TAB_FORWARD, false); this._animateIn(DockManager.settings.animationTime, 0); } @@ -1291,7 +1296,7 @@ const DockedDash = GObject.registerClass({ // Restore dash accessibility Main.ctrlAltTabManager.addGroup( this.dash, _('Dash'), 'user-bookmarks-symbolic', - {focusCallback: this._onAccessibilityFocus.bind(this)}); + {focusCallback: timestamp => this._onAccessibilityFocus(timestamp)}); } /** @@ -1317,15 +1322,10 @@ const DockedDash = GObject.registerClass({ } }; - DockManager.settings.connect('changed::scroll-action', () => { - if (isEnabled()) - enable(); - else - disable(); - }); - if (isEnabled()) enable(); + else + disable(); // This was inspired to desktop-scroller@obsidien.github.com const onScrollEvent = event => { @@ -1395,8 +1395,9 @@ const DockedDash = GObject.registerClass({ // clicks events from reaching the dash actor. I can't see a reason // why it should be reactive. Main.wm._workspaceSwitcherPopup.reactive = false; - Main.wm._workspaceSwitcherPopup.connect('destroy', () => { - Main.wm._workspaceSwitcherPopup = null; + Main.wm._workspaceSwitcherPopup.connect('destroy', actor => { + if (Main.wm._workspaceSwitcherPopup === actor) + delete Main.wm._workspaceSwitcherPopup; }); // If Workspace Grid is installed, let them handle the scroll behavior. @@ -1465,7 +1466,7 @@ const KeyboardShortcuts = class DashToDockKeyboardShortcuts { DockManager.allDocks.forEach(dock => { if (dock._numberOverlayTimeoutId) { GLib.source_remove(dock._numberOverlayTimeoutId); - dock._numberOverlayTimeoutId = 0; + delete dock._numberOverlayTimeoutId; } }); @@ -1631,23 +1632,22 @@ const WorkspaceIsolation = class DashToDockWorkspaceIsolation { this._disable(); DockManager.allDocks.forEach(dock => { - this._signalsHandler.addWithLabel( - Labels.ISOLATION, - [global.display, 'restacked', () => dock.dash._queueRedisplay()], - [global.display, 'window-marked-urgent', () => dock.dash._queueRedisplay()], - [global.display, 'window-demands-attention', () => dock.dash._queueRedisplay()], - [global.window_manager, 'switch-workspace', () => dock.dash._queueRedisplay()] - ); + global.display.connectObject('restacked', + () => dock.dash._queueRedisplay(), dock.dash); + global.display.connectObject('window-marked-urgent', + () => dock.dash._queueRedisplay(), dock.dash); + global.display.connectObject('window-demands-attention', + () => dock.dash._queueRedisplay(), dock.dash); + global.window_manager.connectObject('switch-workspace', + () => dock.dash._queueRedisplay(), dock.dash); // This last signal is only needed for monitor isolation, as windows // might migrate from one monitor to another without triggering 'restacked' if (DockManager.settings.isolateMonitors) { - this._signalsHandler.addWithLabel(Labels.ISOLATION, - global.display, - 'window-entered-monitor', - dock.dash._queueRedisplay.bind(dock.dash)); + global.display.connectObject('window-entered-monitor', + () => dock.dash._queueRedisplay(), dock.dash); } - }, this); + }); /** * here this is the Shell.App @@ -1671,11 +1671,15 @@ const WorkspaceIsolation = class DashToDockWorkspaceIsolation { } _disable() { - this._signalsHandler.removeWithLabel(Labels.ISOLATION); + DockManager.allDocks.forEach(dock => { + global.display.disconnectObject(dock.dash); + global.window_manager.disconnectObject(dock.dash); + }); this._injectionsHandler.removeWithLabel(Labels.ISOLATION); } destroy() { + this._disable(); this._signalsHandler.destroy(); this._injectionsHandler.destroy(); } @@ -1709,10 +1713,11 @@ export class DockManager { !this._notificationsMonitor.dndMode && this._settings.showIconsEmblems; const ensureRemoteModel = () => { - if (needsRemoteModel && !this._remoteModel) { + const shouldHaveRemoteModel = needsRemoteModel(); + if (shouldHaveRemoteModel && !this._remoteModel) { this._remoteModel = new LauncherAPI.LauncherEntryRemoteModel(); this._appIconsDecorator = new AppIconsDecorator.AppIconsDecorator(); - } else if (!needsRemoteModel) { + } else if (!shouldHaveRemoteModel) { this._remoteModel?.destroy(); delete this._remoteModel; this._appIconsDecorator?.destroy(); @@ -1721,8 +1726,10 @@ export class DockManager { }; ensureRemoteModel(); - this._notificationsMonitor.connect('changed', ensureRemoteModel); - this._settings.connect('changed::show-icons-emblems', ensureRemoteModel); + this._signalsHandler.add(this._notificationsMonitor, 'changed', + () => ensureRemoteModel()); + this._signalsHandler.add(this._settings, 'changed::show-icons-emblems', + () => ensureRemoteModel()); if (this._discreteGpuAvailable === undefined) { const updateDiscreteGpuAvailable = () => { @@ -1800,7 +1807,7 @@ export class DockManager { } get mainDock() { - return this._allDocks.length ? this._allDocks[0] : null; + return this._allDocks[0] ?? null; } get removables() { @@ -2075,15 +2082,10 @@ export class DockManager { // First we create the main Dock, to get the extra features to bind to this one - let dock = new DockedDash({ + this._createDock({ monitorIndex: this._preferredMonitorIndex, isMain: true, }); - this._allDocks.push(dock); - - // connect app icon into the view selector - dock.dash.showAppsButton.connect('notify::checked', - this._onShowAppsButtonToggled.bind(this)); // Make the necessary changes to Main.overview.dash this._prepareMainDash(); @@ -2096,11 +2098,8 @@ export class DockManager { for (let iMon = 0; iMon < nMon; iMon++) { if (iMon === this._preferredMonitorIndex) continue; - dock = new DockedDash({monitorIndex: iMon}); - this._allDocks.push(dock); - // connect app icon into the view selector - dock.dash.showAppsButton.connect('notify::checked', - this._onShowAppsButtonToggled.bind(this)); + + this._createDock({monitorIndex: iMon}); } } @@ -2112,6 +2111,24 @@ export class DockManager { this.emit('docks-ready'); } + _createDock(params) { + const dock = new DockedDash(params); + this._allDocks.push(dock); + + // connect app icon into the view selector + dock.dash.showAppsButton.connectObject('notify::checked', + button => this._onShowAppsButtonToggled(button), dock); + + const id = dock.connect('destroy', () => { + dock.disconnect(id); + const index = this._allDocks.indexOf(dock); + if (index !== -1) + this._allDocks.splice(index, 1); + }); + + return dock; + } + _prepareStartupAnimation() { DockManager.allDocks.forEach(dock => { const {dash} = dock; @@ -2421,22 +2438,6 @@ export class DockManager { /* eslint-enable no-invalid-this */ }); - if (AppDisplay.BaseAppView?.prototype?._pageForCoords) { - // Ensure we handle Dnd events happening on the dock when we're - // dragging from AppDisplay. - // Remove when merged - // https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2002 - this._methodInjections.addWithLabel(Labels.MAIN_DASH, - AppDisplay.BaseAppView.prototype, - '_pageForCoords', function (originalFunction, ...args) { - /* eslint-disable no-invalid-this */ - if (!this._scrollView.has_pointer) - return AppDisplay.SidePages.NONE; - return originalFunction.call(this, ...args); - /* eslint-enable no-invalid-this */ - }); - } - if (Main.layoutManager._startingUp) { this._prepareStartupAnimation(); @@ -2461,17 +2462,13 @@ export class DockManager { } _deleteDocks() { - if (!this._allDocks.length) - return; - // Remove extra features - this._workspaceIsolation.destroy(); - this._keyboardShortcuts.destroy(); - this._desktopIconsUsableArea.resetMargins(); + this._workspaceIsolation?.destroy(); + this._keyboardShortcuts?.destroy(); + this._desktopIconsUsableArea?.resetMargins(); // Delete all docks - this._allDocks.forEach(d => d.destroy()); - this._allDocks = []; + [...this._allDocks].forEach(d => d.destroy()); this.emit('docks-destroyed'); } @@ -2629,7 +2626,7 @@ export class IconAnimator { this._settingsChangedId = St.Settings.get().connect('notify', () => this._updateSettings()); - this._timeline.connect('new-frame', () => { + this._newFrameID = this._timeline.connect('new-frame', () => { const progress = this._timeline.get_progress(); const wiggleRotation = progress < 1 / 6 ? 15 * Math.sin(progress * 24 * Math.PI) : 0; const wigglers = this._animations.wiggle; @@ -2645,8 +2642,9 @@ export class IconAnimator { destroy() { St.Settings.get().disconnect(this._settingsChangedId); + this._timeline.disconnect(this._newFrameID); this._timeline.stop(); - this._timeline = null; + delete this._timeline; for (const pairs of Object.values(this._animations)) { for (let i = 0, iMax = pairs.length; i < iMax; i++) { const pair = pairs[i]; diff --git a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/extension.js b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/extension.js index 68de2ac..2919727 100644 --- a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/extension.js +++ b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/extension.js @@ -8,6 +8,7 @@ export let dockManager; export default class DashToDockExtension extends Extension.Extension { enable() { + DockManager._singleton = null; dockManager = new DockManager(this); } diff --git a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/intellihide.js b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/intellihide.js index 9668af2..5622586 100644 --- a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/intellihide.js +++ b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/intellihide.js @@ -135,14 +135,17 @@ export class Intellihide { _addWindowSignals(wa) { if (!this._handledWindow(wa)) return; - const signalId = wa.connect('notify::allocation', this._checkOverlap.bind(this)); - this._trackedWindows.set(wa, signalId); - wa.connect('destroy', this._removeWindowSignals.bind(this)); + + this._trackedWindows.set(wa, [ + wa.connect('notify::allocation', () => this._checkOverlap()), + wa.connect('destroy', () => this._removeWindowSignals(wa)), + ]); } _removeWindowSignals(wa) { - if (this._trackedWindows.get(wa)) { - wa.disconnect(this._trackedWindows.get(wa)); + const signalIds = this._trackedWindows.get(wa); + if (signalIds) { + signalIds.forEach(id => wa.disconnect(id)); this._trackedWindows.delete(wa); } } diff --git a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/launcherAPI.js b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/launcherAPI.js index 8778d32..6a0a60b 100644 --- a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/launcherAPI.js +++ b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/launcherAPI.js @@ -123,6 +123,7 @@ export class LauncherEntryRemoteModel { remote.quicklist = null; let menuClient = remote._quicklistMenuClient; if (menuClient) { + menuClient.disconnect(menuClient._rootChangedHandlerId); menuClient.dbus_object = quicklistPath; } else { // This property should not be enumerable @@ -144,7 +145,8 @@ export class LauncherEntryRemoteModel { } } }; - menuClient.connect(DBusMenu.CLIENT_SIGNAL_ROOT_CHANGED, handler); + menuClient._rootChangedHandlerId = + menuClient.connect(DBusMenu.CLIENT_SIGNAL_ROOT_CHANGED, handler); } } else { remote[name] = properties[name].unpack(); diff --git a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/locale/cs/LC_MESSAGES/dashtodock.mo b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/locale/cs/LC_MESSAGES/dashtodock.mo index 7b092bf..23c2b0a 100644 Binary files a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/locale/cs/LC_MESSAGES/dashtodock.mo and b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/locale/cs/LC_MESSAGES/dashtodock.mo differ diff --git a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/locale/pl/LC_MESSAGES/dashtodock.mo b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/locale/pl/LC_MESSAGES/dashtodock.mo index a48230d..25f1770 100644 Binary files a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/locale/pl/LC_MESSAGES/dashtodock.mo and b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/locale/pl/LC_MESSAGES/dashtodock.mo differ diff --git a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/locale/pt_BR/LC_MESSAGES/dashtodock.mo b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/locale/pt_BR/LC_MESSAGES/dashtodock.mo index de2a4e6..f8dd590 100644 Binary files a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/locale/pt_BR/LC_MESSAGES/dashtodock.mo and b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/locale/pt_BR/LC_MESSAGES/dashtodock.mo differ diff --git a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/metadata.json b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/metadata.json index cbb546f..62491e3 100644 --- a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/metadata.json +++ b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/metadata.json @@ -14,5 +14,5 @@ ], "url": "https://micheleg.github.io/dash-to-dock/", "uuid": "dash-to-dock@micxgx.gmail.com", - "version": 104 + "version": 105 } \ No newline at end of file diff --git a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/theming.js b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/theming.js index 611eb40..06ac3cb 100644 --- a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/theming.js +++ b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/theming.js @@ -30,6 +30,7 @@ const TransparencyMode = { const Labels = Object.freeze({ TRANSPARENCY: Symbol('transparency'), + THEME_CHANGED: Symbol('theme-changed'), }); export const PositionStyleClass = Object.freeze([ @@ -55,11 +56,6 @@ export class ThemeManager { this._transparency = new Transparency(dock); this._signalsHandler.add([ - // When theme changes re-obtain default background color - St.ThemeContext.get_for_stage(global.stage), - 'changed', - this.updateCustomTheme.bind(this), - ], [ // update :overview pseudoclass Main.overview, 'showing', @@ -70,7 +66,29 @@ export class ThemeManager { this._onOverviewHiding.bind(this), ]); - this._updateCustomStyleClasses(); + this._signalsHandler.addWithLabel(Labels.THEME_CHANGED, + St.ThemeContext.get_for_stage(global.stage), 'changed', + () => this.updateCustomTheme()); + + const maybeUpdateCustomTheme = () => { + if (this._actor.mapped) { + this._signalsHandler.unblockWithLabel(Labels.THEME_CHANGED); + this.updateCustomTheme(); + } else { + this._signalsHandler.blockWithLabel(Labels.THEME_CHANGED); + } + }; + + this._signalsHandler.add(this._actor, 'notify::mapped', + () => maybeUpdateCustomTheme()); + + maybeUpdateCustomTheme(); + + // Set the initial overview pseudo-class state. + if (Main.overview.visible) + this._onOverviewShowing(); + else + this._onOverviewHiding(); // destroy themeManager when the managed actor is destroyed (e.g. extension unload) // in order to disconnect signals @@ -122,11 +140,6 @@ export class ThemeManager { } _getDefaultColors() { - // Prevent shell crash if the actor is not on the stage. - // It happens enabling/disabling repeatedly the extension - if (!this._dash._background.get_stage()) - return [null, null]; - // Remove custom style const oldStyle = this._dash._background.get_style(); this._dash._background.set_style(null); @@ -237,11 +250,6 @@ export class ThemeManager { * Reimported back and adapted from atomdock */ _adjustTheme() { - // Prevent shell crash if the actor is not on the stage. - // It happens enabling/disabling repeatedly the extension - if (!this._dash._background.get_stage()) - return; - const {settings} = Docking.DockManager; // Remove prior style edits @@ -307,7 +315,7 @@ export class ThemeManager { 'extend-height', 'force-straight-corner']; - this._signalsHandler.add(...keys.map(key => [ + this._signalsHandler.addWithLabel(Labels.THEME_CHANGED, ...keys.map(key => [ Docking.DockManager.settings, `changed::${key}`, () => this.updateCustomTheme(), -- cgit v1.3