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
This commit is contained in:
Owen W. Taylor 2014-09-09 16:15:51 -04:00
parent 9401196e88
commit 301acac163

View File

@ -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,9 +1179,6 @@ 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);
if (w->frame)
@ -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",