From ee57dab846ed31f0fe969bb6cbeee3bc2f23d561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 14 Mar 2010 15:47:42 +0100 Subject: [PATCH] [Workspace] Disconnect reposition handler when leaving overview As the repositioning after closing a window preview is delayed, it is possible that the timeout is triggered while leaving the overview. In that case the previews move to the new overview position and are changed abruptly to the original window position when the overview zoom is done. To prevent this, disconnect the handler when leaving the overview. --- js/ui/workspace.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 20d5fd27c..0b5599011 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -1366,6 +1366,10 @@ Workspace.prototype = { this._hideAllOverlays(); + if (this._repositionWindowsId > 0) { + Mainloop.source_remove(this._repositionWindowsId); + this._repositionWindowsId = 0; + } Main.overview.connect('hidden', Lang.bind(this, this._doneLeavingOverview));