[metacity] stack-tracker: keep override redirect windows on top
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] stack-tracker: keep override redirect windows on top
- Date: Sat, 30 Sep 2017 11:10:25 +0000 (UTC)
commit 61bb2c4cdc7595f039821664f7d4d2961f5d41df
Author: Rui Matos <tiagomatos gmail com>
Date: Fri May 19 17:11:19 2017 +0200
stack-tracker: keep override redirect windows on top
https://git.gnome.org/browse/mutter/commit/?id=e3d5bc07
https://bugzilla.gnome.org/show_bug.cgi?id=780485
src/core/stack-tracker.c | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/src/core/stack-tracker.c b/src/core/stack-tracker.c
index dedfbfa..922801f 100644
--- a/src/core/stack-tracker.c
+++ b/src/core/stack-tracker.c
@@ -151,6 +151,9 @@ struct _MetaStackTracker
};
static void
+meta_stack_tracker_keep_override_redirect_on_top (MetaStackTracker *tracker);
+
+static void
meta_stack_op_dump (MetaStackOp *op,
const char *prefix,
const char *suffix)
@@ -768,6 +771,8 @@ meta_stack_tracker_sync_stack (MetaStackTracker *tracker)
tracker->sync_stack_idle = 0;
}
+ meta_stack_tracker_keep_override_redirect_on_top (tracker);
+
meta_stack_tracker_get_stack (tracker, &windows, &n_windows);
meta_windows = NULL;
@@ -891,6 +896,38 @@ meta_stack_tracker_lower (MetaStackTracker *tracker,
meta_stack_tracker_raise_above (tracker, window, None);
}
+static void
+meta_stack_tracker_keep_override_redirect_on_top (MetaStackTracker *tracker)
+{
+ MetaWindow *window;
+ Window *stack;
+ int n_windows, i;
+ int topmost_non_or;
+
+ meta_stack_tracker_get_stack (tracker, &stack, &n_windows);
+
+ for (i = n_windows - 1; i >= 0; i--)
+ {
+ window = meta_display_lookup_x_window (tracker->screen->display, stack[i]);
+ if (window && window->layer != META_LAYER_OVERRIDE_REDIRECT)
+ break;
+ }
+
+ topmost_non_or = i;
+
+ for (i -= 1; i >= 0; i--)
+ {
+ window = meta_display_lookup_x_window (tracker->screen->display, stack[i]);
+ if (window && window->layer == META_LAYER_OVERRIDE_REDIRECT)
+ {
+ meta_stack_tracker_raise_above (tracker, stack[i], stack[topmost_non_or]);
+ meta_stack_tracker_get_stack (tracker, &stack, &n_windows);
+ topmost_non_or -= 1;
+ }
+ }
+}
+
+
void
meta_stack_tracker_restack_managed (MetaStackTracker *tracker,
const Window *managed,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]