[mutter] stack.c: remove obsolete handling of override-redirect windows
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] stack.c: remove obsolete handling of override-redirect windows
- Date: Fri, 12 Sep 2014 17:45:01 +0000 (UTC)
commit 301acac1634a57ab1b1a2ef956186a3b01ac83b6
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Tue Sep 9 16:15:51 2014 -0400
stack.c: remove obsolete handling of override-redirect windows
There was still code in stack.c to handle skipping override-redirect windows,
but since quite a while ago, meta_stack_add() is not called for OR windows
since they are outside our stacking control. Add an assertion and remove
unnecessary code.
https://bugzilla.gnome.org/show_bug.cgi?id=736559
src/core/stack.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/src/core/stack.c b/src/core/stack.c
index a4d2b1c..e4f66a5 100644
--- a/src/core/stack.c
+++ b/src/core/stack.c
@@ -101,6 +101,8 @@ void
meta_stack_add (MetaStack *stack,
MetaWindow *window)
{
+ g_return_if_fail (window->override_redirect);
+
meta_topic (META_DEBUG_STACK, "Adding window %s to the stack\n", window->desc);
if (window->stack_position >= 0)
@@ -1141,7 +1143,6 @@ stack_sync_to_xserver (MetaStack *stack)
GArray *all_root_children_stacked; /* wayland OR x11 */
GList *tmp;
GArray *x11_hidden_stack_ids;
- int n_override_redirect = 0;
/* Bail out if frozen */
if (stack->freeze_count > 0)
@@ -1178,10 +1179,7 @@ stack_sync_to_xserver (MetaStack *stack)
w->layer, w->stack_position, w->desc);
/* remember, stacked is in reverse order (bottom to top) */
- if (w->override_redirect)
- n_override_redirect++;
- else
- g_array_prepend_val (x11_stacked, w->xwindow);
+ g_array_prepend_val (x11_stacked, w->xwindow);
if (w->frame)
top_level_window = w->frame->xwindow;
@@ -1213,11 +1211,6 @@ stack_sync_to_xserver (MetaStack *stack)
meta_topic (META_DEBUG_STACK, "\n");
meta_pop_no_msg_prefix ();
- /* All X windows should be in some stacking order */
- if (x11_stacked->len != stack->xwindows->len - n_override_redirect)
- meta_bug ("%u windows stacked, %u windows exist in stack\n",
- x11_stacked->len, stack->xwindows->len);
-
/* Sync to server */
meta_topic (META_DEBUG_STACK, "Restacking %u windows\n",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]