[mutter/wip/gbsneto/tiling-improvements: 36/37] window: Raise and lower tile match in tandem



commit ac159920e310fe8ea59e59c56518c9be13283609
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Jun 15 19:52:13 2017 -0300

    window: Raise and lower tile match in tandem
    
    When a pair of tiled windows are grouped together, they
    are treated as parts of a whole and interacting with one
    affects the other.
    
    Following the idea that sibling tiled windows are treated
    as part of the same group, they should also be raised and
    lowered together.
    
    It is still possible to break tiled windows grouping by
    simply untiling the window with the keyboard or by grabbing
    and resizing or moving the window with the cursor.
    
    This patch makes sibling tiled windows be lowered and raised
    in tandem. For future reference, this behavior is documented
    in [1].
    
    [1] https://wiki.gnome.org/GeorgesNeto/MinutesOfFeaneron/Tiling
    
    https://bugzilla.gnome.org/show_bug.cgi?id=645153

 src/core/window.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 7d12038..b4b39cd 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -4748,7 +4748,13 @@ meta_window_raise (MetaWindow  *window)
    * the child windows appropriately.
    */
   if (window->screen->stack == ancestor->screen->stack)
-    meta_stack_raise (window->screen->stack, ancestor);
+    {
+      /* If the window has a tile sibling, raise it before raising the window itself */
+      if (window->tile_match)
+        meta_stack_raise (window->tile_match->screen->stack, window->tile_match);
+
+      meta_stack_raise (window->screen->stack, ancestor);
+    }
   else
     {
       meta_warning (
@@ -4780,6 +4786,10 @@ meta_window_lower (MetaWindow  *window)
   meta_topic (META_DEBUG_WINDOW_OPS,
               "Lowering window %s\n", window->desc);
 
+  /* If the window has a tile sibling, lower it before loweting the window itself */
+  if (window->tile_match)
+    meta_stack_lower (window->tile_match->screen->stack, window->tile_match);
+
   meta_stack_lower (window->screen->stack, window);
 }
 


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