Skip to content

Commit

Permalink
Remove any dependency on dockmanager in desktopIconsIntegration.js
Browse files Browse the repository at this point in the history
Dockmanager can be null, and this spams the log if desktopIconsIntegration class
is initialized and used.

desktopIconsIntegration class is initialized and called from the extension and
really should not have any other dependencies other than the shell,
it is meant to be used and can be used as is by any extension if called as is
independently without modifications.
  • Loading branch information
smedir committed Dec 12, 2023
1 parent ac7e317 commit 69d0fbe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions desktopIconsIntegration.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@
import {GLib} from './dependencies/gi.js';
import {Main} from './dependencies/shell/ui.js';
import {ExtensionUtils} from './dependencies/shell/misc.js';

import {DockManager} from './docking.js';
import {Extension} from './dependencies/shell/extensions/extension.js';

const IDENTIFIER_UUID = '130cbc66-235c-4bd6-8571-98d2d8bba5e2';

export class DesktopIconsUsableAreaClass {
constructor() {
const Me = Extension.lookupByURL(import.meta.url);
this._UUID = Me.uuid;
this._extensionManager = Main.extensionManager;
this._timedMarginsID = 0;
this._margins = {};
Expand Down Expand Up @@ -158,7 +159,7 @@ export class DesktopIconsUsableAreaClass {
const usableArea = extension?.stateObj?.DesktopIconsUsableArea;
if (usableArea?.uuid === IDENTIFIER_UUID) {
usableArea.setMarginsForExtension(
DockManager.extension.uuid, this._margins);
this._UUID, this._margins);
}
}
}

0 comments on commit 69d0fbe

Please sign in to comment.