[mutter] tiling: Reset maximized tile mode when unmaximizing



commit 594a69317ac54172e90940fad5ace633dd056714
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Dec 10 16:45:27 2010 +0100

    tiling: Reset maximized tile mode when unmaximizing
    
    Maximized tiled windows end up with an inconsistent tile mode when
    unmaximized by other means than dragging the window free (e.g.
    using the unmaximize button or double clicking the title bar), so
    reset the tile mode when unmaximizing.
    
    This is not a problem for side-by-side tiling, as there are no
    alternatives to dragging the window free.

 src/core/window.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index c1c119c..3e5c754 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -3335,6 +3335,13 @@ meta_window_unmaximize_internal (MetaWindow        *window,
       window->maximized_vertically =
         window->maximized_vertically   && !unmaximize_vertically;
 
+      /* Reset the tile mode for maximized tiled windows for consistency
+       * with "normal" maximized windows, but keep other tile modes,
+       * as side-by-side tiled windows may snap back.
+       */
+      if (window->tile_mode == META_TILE_MAXIMIZED)
+        window->tile_mode = META_TILE_NONE;
+
       /* Unmaximize to the saved_rect position in the direction(s)
        * being unmaximized.
        */



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