workspace: Smarten assert in light of O-R windows
O-R windows appear in workspace->windows, which aren't relocatable, so we can't simply check if the workspace is empty after relocating all normal windows, since those windows remain. Make sure that the only windows we have are those that are on_all_workspaces.
This commit is contained in:
parent
01a47c7d6d
commit
8f757c7b80
@ -241,6 +241,19 @@ workspace_free_builtin_struts (MetaWorkspace *workspace)
|
||||
workspace->builtin_struts = NULL;
|
||||
}
|
||||
|
||||
/* Ensure that the workspace is empty by making sure that
|
||||
* all of our windows are on-all-workspaces. */
|
||||
static void
|
||||
assert_workspace_empty (MetaWorkspace *workspace)
|
||||
{
|
||||
GList *l;
|
||||
for (l = workspace->windows; l != NULL; l = l->next)
|
||||
{
|
||||
MetaWindow *window = l->data;
|
||||
g_assert (window->on_all_workspaces);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_workspace_remove (MetaWorkspace *workspace)
|
||||
{
|
||||
@ -249,7 +262,7 @@ meta_workspace_remove (MetaWorkspace *workspace)
|
||||
|
||||
g_return_if_fail (workspace != workspace->screen->active_workspace);
|
||||
|
||||
g_assert (workspace->windows == NULL);
|
||||
assert_workspace_empty (workspace);
|
||||
|
||||
screen = workspace->screen;
|
||||
|
||||
@ -349,7 +362,7 @@ meta_workspace_relocate_windows (MetaWorkspace *workspace,
|
||||
|
||||
g_list_free (copy);
|
||||
|
||||
g_assert (workspace->windows == NULL);
|
||||
assert_workspace_empty (workspace);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user