From b88b74342869f31ed169a4beadd40760eecafa94 Mon Sep 17 00:00:00 2001 From: Vit Stanislav Date: Sun, 8 Jan 2012 10:58:00 +0100 Subject: [PATCH] Delay rearrangement when cursor hovers a window In overview when closing a window and afterwards dragging a window it can happen that you pick a wrong window or no window if windows' positions is updated while initiating the drag. Fix that by delaying window rearrangement when cursor is over a window. https://bugzilla.gnome.org/show_bug.cgi?id=645325 --- js/ui/workspace.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index b618bb6c2..fffa7c313 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -1155,6 +1155,12 @@ const Workspace = new Lang.Class({ return true; } + let actorUnderPointer = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, x, y); + for (let i = 0; i < this._windows.length; i++) { + if (this._windows[i].actor == actorUnderPointer) + return true; + } + this.positionWindows(WindowPositionFlags.ANIMATE); return false; },