[gnome-shell] workspaceAnimation: Make WorkspaceGroup public



commit 8b3f74bb7dcbd8f0b01d1083fd056987289116e5
Author: Sergio Costas <raster rastersoft com>
Date:   Sun Dec 19 00:05:21 2021 +0100

    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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2068>

 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 d240fe1562..f61afe323b 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();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]