Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix communication with DING (same patch for "ubuntu-dock" branch) #2221

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions desktopIconsIntegration.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ import {Extension} from 'resource:///org/gnome/shell/extensions/extension.js';
const IDENTIFIER_UUID = '130cbc66-235c-4bd6-8571-98d2d8bba5e2';

export class DesktopIconsUsableAreaClass {
_checkIfExtensionIsEnabled(extension) {
return (extension?.state === ExtensionUtils.ExtensionState.ENABLED) ||
(extension?.state === ExtensionUtils.ExtensionState.ACTIVE);
}

constructor() {
const Me = Extension.lookupByURL(import.meta.url);
this._UUID = Me.uuid;
Expand All @@ -75,7 +80,7 @@ export class DesktopIconsUsableAreaClass {

// If an extension is being enabled and lacks the
// DesktopIconsUsableArea object, we can avoid launching a refresh
if (extension.state === ExtensionUtils.ExtensionState.ENABLED) {
if (this._checkIfExtensionIsEnabled(extension)) {
this._sendMarginsToExtension(extension);
return;
}
Expand Down Expand Up @@ -153,7 +158,7 @@ export class DesktopIconsUsableAreaClass {
_sendMarginsToExtension(extension) {
// check that the extension is an extension that has the logic to accept
// working margins
if (extension?.state !== ExtensionUtils.ExtensionState.ENABLED)
if (!this._checkIfExtensionIsEnabled(extension))
return;

const usableArea = extension?.stateObj?.DesktopIconsUsableArea;
Expand Down