[mutter] tiling: Fix dragging windows free from edge-tiling



commit 26e41bc24a7f92bc672337a86af525e88c5d68c2
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon Mar 21 01:34:27 2011 +0100

    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 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index c9566bc..99650f5 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))
         {



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