screen: Unset the active workspace and remove workspaces on free

Related to https://gitlab.gnome.org/GNOME/mutter/issues/652
This commit is contained in:
Marco Trevisan (Treviño) 2019-06-25 20:22:54 +02:00 committed by Marco Trevisan
parent 0ca9d88926
commit d3f75f31c8

View File

@ -836,6 +836,7 @@ meta_screen_free (MetaScreen *screen,
guint32 timestamp) guint32 timestamp)
{ {
MetaDisplay *display; MetaDisplay *display;
GList *l;
display = screen->display; display = screen->display;
@ -877,6 +878,16 @@ meta_screen_free (MetaScreen *screen,
g_free (screen->screen_name); g_free (screen->screen_name);
screen->active_workspace = NULL;
for (l = screen->workspaces; l;)
{
MetaWorkspace *workspace = l->data;
l = l->next;
meta_workspace_remove (workspace);
}
g_object_unref (screen); g_object_unref (screen);
} }