[gnome-shell] workspace: Stop using clone terminology in WindowPreviewLayout



commit 039431a73fa06261ee80a56415795def807f8985
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Mon Jun 8 09:32:23 2020 +0200

    workspace: Stop using clone terminology in WindowPreviewLayout
    
    We're going to remove ClutterClones, so call the parameters to
    addWindow() and removeWindow() "actor" instead of "clone". Also make the
    destroyIds less confusing and rename the actual actor destroy id to
    "destroyId", and rename the window actors destroy id to
    "windowActorDestroyId".
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307

 js/ui/workspace.js | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 82b51e7d90..e50d8b30d2 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -118,42 +118,42 @@ var WindowPreviewLayout = GObject.registerClass({
         }
     }
 
-    addWindow(clone, metaWindow) {
-        if (this._windows.has(clone))
+    addWindow(actor, metaWindow) {
+        if (this._windows.has(actor))
             return;
 
         const windowActor = metaWindow.get_compositor_private();
 
-        this._windows.set(clone, {
+        this._windows.set(actor, {
             metaWindow,
             windowActor,
             sizeChangedId: metaWindow.connect('size-changed', () =>
                 this._layoutChanged()),
             positionChangedId: metaWindow.connect('position-changed', () =>
                 this._layoutChanged()),
-            destroyId: windowActor.connect('destroy', () =>
-                clone.destroy()),
-            cloneDestroyId: clone.connect('destroy', () =>
-                this.removeWindow(clone)),
+            windowActorDestroyId: windowActor.connect('destroy', () =>
+                actor.destroy()),
+            destroyId: actor.connect('destroy', () =>
+                this.removeWindow(actor)),
         });
 
-        this._container.add_child(clone);
+        this._container.add_child(actor);
 
         this._layoutChanged();
     }
 
-    removeWindow(clone) {
-        const windowInfo = this._windows.get(clone);
+    removeWindow(actor) {
+        const windowInfo = this._windows.get(actor);
         if (!windowInfo)
             return;
 
         windowInfo.metaWindow.disconnect(windowInfo.sizeChangedId);
         windowInfo.metaWindow.disconnect(windowInfo.positionChangedId);
-        windowInfo.windowActor.disconnect(windowInfo.destroyId);
-        clone.disconnect(windowInfo.cloneDestroyId);
+        windowInfo.windowActor.disconnect(windowInfo.windowActorDestroyId);
+        actor.disconnect(windowInfo.destroyId);
 
-        this._windows.delete(clone);
-        this._container.remove_child(clone);
+        this._windows.delete(actor);
+        this._container.remove_child(actor);
 
         this._layoutChanged();
     }


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