[gnome-shell/gbsneto/more-content] workspace, workspaceThumbnail: Use window content (WIP)



commit ef8a4e79e056acfd20200a814aeaed48d01d5f9a
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Jul 16 14:07:10 2019 -0300

    workspace, workspaceThumbnail: Use window content (WIP)

 js/ui/workspace.js          | 4 ++--
 js/ui/workspaceThumbnail.js | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 4c2cbf064..faacaf03b 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -111,7 +111,7 @@ var WindowClone = GObject.registerClass({
         this.metaWindow._delegate = this;
         this._workspace = workspace;
 
-        this._windowClone = new Clutter.Clone({ source: realWindow });
+        this._windowClone = new Clutter.Actor({ content: realWindow.content });
         // We expect this to be used for all interaction rather than
         // this._windowClone; as the former is reactive and the latter
         // is not, this just works for most cases. However, for DND all
@@ -237,7 +237,7 @@ var WindowClone = GObject.registerClass({
     }
 
     _doAddAttachedDialog(metaWin, realWin) {
-        let clone = new Clutter.Clone({ source: realWin });
+        let clone = new Clutter.Actor({ content: realWin.content });
         clone._sizeChangedId = metaWin.connect('size-changed',
             this._onMetaWindowSizeChanged.bind(this));
         clone._posChangedId = metaWin.connect('position-changed',
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index 9edddfa24..8fd7ef194 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -47,7 +47,7 @@ class PrimaryActorLayout extends Clutter.FixedLayout {
 
 var WindowClone = class {
     constructor(realWindow) {
-        this.clone = new Clutter.Clone({ source: realWindow });
+        this.clone = new Clutter.Actor({ content: realWindow.content });
 
         /* Can't use a Shell.GenericContainer because of DND and reparenting... */
         this.actor = new Clutter.Actor({ layout_manager: new PrimaryActorLayout(this.clone),
@@ -139,7 +139,8 @@ var WindowClone = class {
     }
 
     _doAddAttachedDialog(metaDialog, realDialog) {
-        let clone = new Clutter.Clone({ source: realDialog });
+        let clone = new Clutter.Actor({ source: realDialog.content,
+                                        request_mode: Clutter.RequestMode.CONTENT_SIZE });
         this._updateDialogPosition(realDialog, clone);
 
         clone._updateId = realDialog.connect('notify::position', dialog => {
@@ -165,7 +166,7 @@ var WindowClone = class {
 
     _disconnectSignals() {
         this.actor.get_children().forEach(child => {
-            let realWindow = child.source;
+            let realWindow = child.content.window_actor;
 
             realWindow.disconnect(child._updateId);
             realWindow.disconnect(child._destroyId);


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