[mutter/wip/gbsneto/edge-constraints: 20/26] window: Raise and lower tile match in tandem
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/gbsneto/edge-constraints: 20/26] window: Raise and lower tile match in tandem
- Date: Tue, 19 Sep 2017 02:32:20 +0000 (UTC)
commit 62c3ed323d4b6560be6308b5ba90221faa5ef35c
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 94b8716..baac9a1 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -4767,7 +4767,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 (
@@ -4799,6 +4805,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]