mirror of
https://github.com/brl/mutter.git
synced 2025-04-15 06:39:38 +00:00
screen: Fix workspace removal
I accidentally broke this in commit a119ea9. The code was considerably more complicated than it needs to be, so let's replace it with a g_list_find and nothing more.
This commit is contained in:
parent
e0c92befd5
commit
32cf4afb04
@ -1073,19 +1073,16 @@ meta_screen_remove_workspace (MetaScreen *screen, MetaWorkspace *workspace,
|
||||
guint32 timestamp)
|
||||
{
|
||||
GList *l;
|
||||
GList *next;
|
||||
MetaWorkspace *neighbour = NULL;
|
||||
GList *next = NULL;
|
||||
int index;
|
||||
gboolean active_index_changed;
|
||||
int new_num;
|
||||
|
||||
for (l = screen->workspaces; l != NULL; l = next)
|
||||
{
|
||||
MetaWorkspace *w = l->data;
|
||||
l = g_list_find (screen->workspaces, workspace);
|
||||
if (!l)
|
||||
return;
|
||||
|
||||
if (w == workspace)
|
||||
{
|
||||
if (l->next)
|
||||
next = l->next;
|
||||
|
||||
if (l->prev)
|
||||
@ -1098,13 +1095,6 @@ meta_screen_remove_workspace (MetaScreen *screen, MetaWorkspace *workspace,
|
||||
return;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!neighbour)
|
||||
return;
|
||||
|
||||
meta_workspace_relocate_windows (workspace, neighbour);
|
||||
|
||||
if (workspace == screen->active_workspace)
|
||||
|
Loading…
x
Reference in New Issue
Block a user