mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
stack: Don't add wayland windows to _NET_CLIENT_LIST
Window->xwindow is None (i.e. 0) for wayland windows and there's no point in adding them to these X specific properties. https://bugzilla.gnome.org/show_bug.cgi?id=764844
This commit is contained in:
parent
c5637c52bd
commit
bbb83d4cd0
@ -142,6 +142,9 @@ meta_stack_remove (MetaStack *stack,
|
|||||||
stack->added = g_list_remove (stack->added, window);
|
stack->added = g_list_remove (stack->added, window);
|
||||||
stack->sorted = g_list_remove (stack->sorted, window);
|
stack->sorted = g_list_remove (stack->sorted, window);
|
||||||
|
|
||||||
|
/* stack->removed is only used to update stack->xwindows */
|
||||||
|
if (window->client_type == META_WINDOW_CLIENT_TYPE_X11)
|
||||||
|
{
|
||||||
/* Remember the window ID to remove it from the stack array.
|
/* Remember the window ID to remove it from the stack array.
|
||||||
* The macro is safe to use: Window is guaranteed to be 32 bits, and
|
* The macro is safe to use: Window is guaranteed to be 32 bits, and
|
||||||
* GUINT_TO_POINTER says it only works on 32 bits.
|
* GUINT_TO_POINTER says it only works on 32 bits.
|
||||||
@ -151,6 +154,7 @@ meta_stack_remove (MetaStack *stack,
|
|||||||
if (window->frame)
|
if (window->frame)
|
||||||
stack->removed = g_list_prepend (stack->removed,
|
stack->removed = g_list_prepend (stack->removed,
|
||||||
GUINT_TO_POINTER (window->frame->xwindow));
|
GUINT_TO_POINTER (window->frame->xwindow));
|
||||||
|
}
|
||||||
|
|
||||||
stack_sync_to_xserver (stack);
|
stack_sync_to_xserver (stack);
|
||||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||||
@ -849,29 +853,20 @@ static void
|
|||||||
stack_do_window_additions (MetaStack *stack)
|
stack_do_window_additions (MetaStack *stack)
|
||||||
{
|
{
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
gint i, n_added;
|
gint n_added;
|
||||||
|
|
||||||
n_added = g_list_length (stack->added);
|
n_added = g_list_length (stack->added);
|
||||||
if (n_added > 0)
|
if (n_added > 0)
|
||||||
{
|
{
|
||||||
Window *end;
|
|
||||||
int old_size;
|
|
||||||
|
|
||||||
meta_topic (META_DEBUG_STACK,
|
meta_topic (META_DEBUG_STACK,
|
||||||
"Adding %d windows to sorted list\n",
|
"Adding %d windows to sorted list\n",
|
||||||
n_added);
|
n_added);
|
||||||
|
|
||||||
old_size = stack->xwindows->len;
|
|
||||||
g_array_set_size (stack->xwindows, old_size + n_added);
|
|
||||||
|
|
||||||
end = &g_array_index (stack->xwindows, Window, old_size);
|
|
||||||
|
|
||||||
/* stack->added has the most recent additions at the
|
/* stack->added has the most recent additions at the
|
||||||
* front of the list, so we need to reverse it
|
* front of the list, so we need to reverse it
|
||||||
*/
|
*/
|
||||||
stack->added = g_list_reverse (stack->added);
|
stack->added = g_list_reverse (stack->added);
|
||||||
|
|
||||||
i = 0;
|
|
||||||
tmp = stack->added;
|
tmp = stack->added;
|
||||||
while (tmp != NULL)
|
while (tmp != NULL)
|
||||||
{
|
{
|
||||||
@ -879,12 +874,12 @@ stack_do_window_additions (MetaStack *stack)
|
|||||||
|
|
||||||
w = tmp->data;
|
w = tmp->data;
|
||||||
|
|
||||||
end[i] = w->xwindow;
|
if (w->client_type == META_WINDOW_CLIENT_TYPE_X11)
|
||||||
|
g_array_append_val (stack->xwindows, w->xwindow);
|
||||||
|
|
||||||
/* add to the main list */
|
/* add to the main list */
|
||||||
stack->sorted = g_list_prepend (stack->sorted, w);
|
stack->sorted = g_list_prepend (stack->sorted, w);
|
||||||
|
|
||||||
++i;
|
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1070,6 +1065,7 @@ stack_sync_to_xserver (MetaStack *stack)
|
|||||||
meta_topic (META_DEBUG_STACK, "%u:%d - %s ",
|
meta_topic (META_DEBUG_STACK, "%u:%d - %s ",
|
||||||
w->layer, w->stack_position, w->desc);
|
w->layer, w->stack_position, w->desc);
|
||||||
|
|
||||||
|
if (w->client_type == META_WINDOW_CLIENT_TYPE_X11)
|
||||||
g_array_append_val (x11_stacked, w->xwindow);
|
g_array_append_val (x11_stacked, w->xwindow);
|
||||||
|
|
||||||
if (w->frame)
|
if (w->frame)
|
||||||
|
Loading…
Reference in New Issue
Block a user