mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
workspace: fix crash when creating a new workspace with sticky windows that have struts
The constructor would collect windows that are sticky before initializing its state which would lead to a crash in the case of windows with struts which trigger a work area recalculation where mutter would assume, due to uninitialized state, that an existing work area has to be freed. https://bugzilla.gnome.org/show_bug.cgi?id=738384
This commit is contained in:
parent
cd32e4a68a
commit
d07e2f4090
@ -180,13 +180,6 @@ meta_workspace_new (MetaScreen *screen)
|
|||||||
workspace->windows = NULL;
|
workspace->windows = NULL;
|
||||||
workspace->mru_list = NULL;
|
workspace->mru_list = NULL;
|
||||||
|
|
||||||
/* make sure sticky windows are in our mru_list */
|
|
||||||
windows = meta_display_list_windows (screen->display, META_LIST_SORTED);
|
|
||||||
for (l = windows; l; l = l->next)
|
|
||||||
if (meta_window_located_on_workspace (l->data, workspace))
|
|
||||||
meta_workspace_add_window (workspace, l->data);
|
|
||||||
g_slist_free (windows);
|
|
||||||
|
|
||||||
workspace->work_areas_invalid = TRUE;
|
workspace->work_areas_invalid = TRUE;
|
||||||
workspace->work_area_monitor = NULL;
|
workspace->work_area_monitor = NULL;
|
||||||
workspace->work_area_screen.x = 0;
|
workspace->work_area_screen.x = 0;
|
||||||
@ -205,6 +198,13 @@ meta_workspace_new (MetaScreen *screen)
|
|||||||
|
|
||||||
workspace->showing_desktop = FALSE;
|
workspace->showing_desktop = FALSE;
|
||||||
|
|
||||||
|
/* make sure sticky windows are in our mru_list */
|
||||||
|
windows = meta_display_list_windows (screen->display, META_LIST_SORTED);
|
||||||
|
for (l = windows; l; l = l->next)
|
||||||
|
if (meta_window_located_on_workspace (l->data, workspace))
|
||||||
|
meta_workspace_add_window (workspace, l->data);
|
||||||
|
g_slist_free (windows);
|
||||||
|
|
||||||
return workspace;
|
return workspace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user