[gnome-shell] workspace: make WindowClone forward the 'size-changed' event



commit 91d8a32f25a3b46903f9a0cf3bed8ef04043ae79
Author: Maxim Ermilov <zaspire rambler ru>
Date:   Mon Jan 31 01:03:12 2011 +0300

    workspace: make WindowClone forward the 'size-changed' event
    
    https://bugzilla.gnome.org/show_bug.cgi?id=640781

 js/ui/workspace.js |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index ddd82bc..cf3feb5 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -104,6 +104,10 @@ WindowClone.prototype = {
 
         this._stackAbove = null;
 
+        this._sizeChangedId = this.realWindow.connect('size-changed', Lang.bind(this, function() {
+            this.emit('size-changed');
+        }));
+
         this.actor.connect('button-release-event',
                            Lang.bind(this, this._onButtonRelease));
 
@@ -157,6 +161,9 @@ WindowClone.prototype = {
     },
 
     _onDestroy: function() {
+        this.realWindow.disconnect(this._sizeChangedId);
+        this._sizeChangedId = 0;
+
         this.metaWindow._delegate = null;
         this.actor._delegate = null;
         if (this._zoomLightbox)
@@ -1325,10 +1332,10 @@ Workspace.prototype = {
                       Lang.bind(this, function() {
                           this._windowIsZooming = false;
                       }));
-        win.connect('size-changed',
-                    Lang.bind(this, function() {
-                        this.positionWindows(0);
-                    }));
+        clone.connect('size-changed',
+                      Lang.bind(this, function() {
+                          this.positionWindows(0);
+                      }));
 
         this.actor.add_actor(clone.actor);
 



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