[mutter/wip/fmuellner/contraint-tiling: 19/23] window: Raise and lower tile match in tandem



commit b86e0d3684bee4ea955dbee794010ac1d54461a2
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 c3866ad..0cfbe2b 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -4872,7 +4872,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 (
@@ -4904,6 +4910,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]