From 8b3d4857aae27b5c87939b1605b6e0a95fcdb36a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 21 Mar 2010 19:33:52 +0100 Subject: [PATCH] [Overview] Postpone window repositioning while zooming After closing a window, the remaining previews are repositioned after a timeout; when it is called while the user zooms a preview, the window positions get all messed up, so postpone the positioning in this case until the zoom ends. https://bugzilla.gnome.org/show_bug.cgi?id=613536 --- js/ui/workspace.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 989493537..a1a3d2ba6 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -135,6 +135,7 @@ WindowClone.prototype = { this._draggable.connect('drag-end', Lang.bind(this, this._onDragEnd)); this.inDrag = false; + this._windowIsZooming = false; this._zooming = false; this._selected = false; }, @@ -1209,6 +1210,9 @@ Workspace.prototype = { }, _delayedWindowRepositioning: function() { + if (this._windowIsZooming) + return true; + let [child, x, y, mask] = Gdk.Screen.get_default().get_root_window().get_pointer(); let wsWidth = this.actor.width * this.scale; @@ -1533,6 +1537,14 @@ Workspace.prototype = { this.emit('window-drag-end', clone.actor); overlay.show(); })); + clone.connect('zoom-start', + Lang.bind(this, function() { + this._windowIsZooming = true; + })); + clone.connect('zoom-end', + Lang.bind(this, function() { + this._windowIsZooming = false; + })); this.actor.add_actor(clone.actor);