[gnome-shell] workspaceThumbnail: Sync clone position changes with actor



commit ce3555382b78d8df767789bdd8840bbc467f2ced
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date:   Fri Jan 19 15:01:16 2018 +0100

    workspaceThumbnail: Sync clone position changes with actor
    
    We need to update the clone position if window actor (not the meta window)
    position changed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776588

 js/ui/workspaceThumbnail.js | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index 68922c943..b1fa587fe 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -68,7 +68,7 @@ var WindowClone = new Lang.Class({
         this.realWindow = realWindow;
         this.metaWindow = realWindow.meta_window;
 
-        this.clone._updateId = this.metaWindow.connect('position-changed',
+        this.clone._updateId = this.realWindow.connect('notify::position',
                                                        this._onPositionChanged.bind(this));
         this.clone._destroyId = this.realWindow.connect('destroy', () => {
             // First destroy the clone and then destroy everything
@@ -153,7 +153,7 @@ var WindowClone = new Lang.Class({
         let clone = new Clutter.Clone({ source: realDialog });
         this._updateDialogPosition(realDialog, clone);
 
-        clone._updateId = metaDialog.connect('position-changed', dialog => {
+        clone._updateId = realDialog.connect('notify::position', dialog => {
             this._updateDialogPosition(dialog, clone);
         });
         clone._destroyId = realDialog.connect('destroy', () => {
@@ -171,7 +171,6 @@ var WindowClone = new Lang.Class({
     },
 
     _onPositionChanged() {
-        let rect = this.metaWindow.get_frame_rect();
         this.actor.set_position(this.realWindow.x, this.realWindow.y);
     },
 
@@ -179,7 +178,7 @@ var WindowClone = new Lang.Class({
         this.actor.get_children().forEach(child => {
             let realWindow = child.source;
 
-            realWindow.meta_window.disconnect(child._updateId);
+            realWindow.disconnect(child._updateId);
             realWindow.disconnect(child._destroyId);
         });
     },


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