From 8b3f74bb7dcbd8f0b01d1083fd056987289116e5 Mon Sep 17 00:00:00 2001 From: Sergio Costas Date: Sun, 19 Dec 2021 00:05:21 +0100 Subject: [PATCH] workspaceAnimation: Make WorkspaceGroup public The WorkspaceGroup class in defined as CONST, which means that, strictly speaking, is inaccessible from outside the file workspaceAnimation.js. But Desktop Icons NG needs access to it. Although the current Javascript engine "tolerates" this access, a warning message is shown in the log advertising that it's incorrect, and that although it is still allowed, the code should be fixed. This patch changes the definition from CONST to VAR to allow accessing it from extensions. jk Part-of: --- js/ui/workspaceAnimation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/ui/workspaceAnimation.js b/js/ui/workspaceAnimation.js index d240fe156..f61afe323 100644 --- a/js/ui/workspaceAnimation.js +++ b/js/ui/workspaceAnimation.js @@ -1,5 +1,5 @@ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- -/* exported WorkspaceAnimationController */ +/* exported WorkspaceAnimationController, WorkspaceGroup */ const { Clutter, GObject, Meta, Shell, St } = imports.gi; @@ -11,7 +11,7 @@ const SwipeTracker = imports.ui.swipeTracker; const WINDOW_ANIMATION_TIME = 250; const WORKSPACE_SPACING = 100; -const WorkspaceGroup = GObject.registerClass( +var WorkspaceGroup = GObject.registerClass( class WorkspaceGroup extends Clutter.Actor { _init(workspace, monitor, movingWindow) { super._init();