From 26e41bc24a7f92bc672337a86af525e88c5d68c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 21 Mar 2011 01:34:27 +0100 Subject: [PATCH] tiling: Fix dragging windows free from edge-tiling Commit 96c43866 changed the tiling behavior to prefer edge tiling over maximization in corner cases (well, quite literally). As a side effect, it only allows untiling of edge-tiled windows by dragging the window towards the correct edge. This patch restores the old behavior for untiling, while keeping the new behavior for untiled windows. https://bugzilla.gnome.org/show_bug.cgi?id=645455 --- src/core/window.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/window.c b/src/core/window.c index c9566bcda..99650f5c8 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -8133,8 +8133,6 @@ update_move (MetaWindow *window, else window->tile_mode = META_TILE_NONE; } - else - window->tile_mode = META_TILE_NONE; /* For maximized tiling we are interested in the outside top edge * of the work area of the monitor where the pointer is located. @@ -8142,6 +8140,11 @@ update_move (MetaWindow *window, * We use the outside edge instead of the inside edge, because we * don't want to force users to maximize windows they are placing * near the top of their screens. + * + * If window->tile_mode is not NONE, that means that either we are + * on an edge and set it above, or we are currently tiled (in + * which case meta_window_can_tile_side_by_side() and + * meta_window_can_tile_maximized() return FALSE). */ if (window->tile_mode == META_TILE_NONE && meta_window_can_tile_maximized (window)) {