mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 04:22:05 +00:00
Ensure that when a workspace is removed from the middle of the list, the
_NET_WM_DESKTOP props on windows on following workspaces are correctly set.
This commit is contained in:
parent
0b978e61aa
commit
b47cd6a3bc
@ -1112,6 +1112,7 @@ meta_screen_remove_workspace (MetaScreen *screen, MetaWorkspace *workspace,
|
||||
{
|
||||
GList *l;
|
||||
MetaWorkspace *neighbour = NULL;
|
||||
GList *next = NULL;
|
||||
|
||||
l = screen->workspaces;
|
||||
while (l)
|
||||
@ -1120,6 +1121,9 @@ meta_screen_remove_workspace (MetaScreen *screen, MetaWorkspace *workspace,
|
||||
|
||||
if (w == workspace)
|
||||
{
|
||||
if (l->next)
|
||||
next = l->next;
|
||||
|
||||
if (l->prev)
|
||||
neighbour = l->prev->data;
|
||||
else if (l->next)
|
||||
@ -1146,6 +1150,16 @@ meta_screen_remove_workspace (MetaScreen *screen, MetaWorkspace *workspace,
|
||||
|
||||
set_number_of_spaces_hint (screen, g_list_length (screen->workspaces));
|
||||
|
||||
l = next;
|
||||
while (l)
|
||||
{
|
||||
MetaWorkspace *w = l->data;
|
||||
|
||||
meta_workspace_update_window_hints (w);
|
||||
|
||||
l = l->next;
|
||||
}
|
||||
|
||||
meta_screen_queue_workarea_recalc (screen);
|
||||
}
|
||||
|
||||
|
@ -477,6 +477,20 @@ meta_workspace_index (MetaWorkspace *workspace)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
meta_workspace_update_window_hints (MetaWorkspace *workspace)
|
||||
{
|
||||
GList *l = workspace->windows;
|
||||
while (l)
|
||||
{
|
||||
MetaWindow *win = l->data;
|
||||
|
||||
meta_window_set_current_workspace_hint (win);
|
||||
|
||||
l = l->next;
|
||||
}
|
||||
}
|
||||
|
||||
/* get windows contained on workspace, including workspace->windows
|
||||
* and also sticky windows.
|
||||
*/
|
||||
|
@ -61,4 +61,7 @@ void meta_workspace_activate (MetaWorkspace *workspace, guint32 timestamp);
|
||||
void meta_workspace_activate_with_focus (MetaWorkspace *workspace,
|
||||
MetaWindow *focus_this,
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_workspace_update_window_hints (MetaWorkspace *workspace);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user