From 233237f0982a53a85c6b9d49e391a9663804a46f Mon Sep 17 00:00:00 2001 From: Eric Piel Date: Mon, 18 Aug 2008 02:48:36 +0000 Subject: [PATCH] add a copy of each strut in a window to the workspace's strut list, 2008-08-18 Eric Piel * src/core/workspace.c (ensure_work_areas_validated): add a copy of each strut in a window to the workspace's strut list, instead of using the copy in the list (which would mean it was double-freed). Believed to fix #468075. svn path=/trunk/; revision=3817 --- ChangeLog | 7 +++++++ src/core/workspace.c | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c2f67d0e5..37e544e19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-18 Eric Piel + + * src/core/workspace.c (ensure_work_areas_validated): add a copy of + each strut in a window to the workspace's strut list, instead of + using the copy in the list (which would mean it was double-freed). + Believed to fix #468075. + 2008-08-16 Ted Percival Ensure the user_rect is set sanely for windows that start maximized. diff --git a/src/core/workspace.c b/src/core/workspace.c index 12355a060..13731d57f 100644 --- a/src/core/workspace.c +++ b/src/core/workspace.c @@ -514,9 +514,12 @@ ensure_work_areas_validated (MetaWorkspace *workspace) MetaWindow *win = tmp->data; GSList *s_iter; - for (s_iter = win->struts; s_iter != NULL; s_iter = s_iter->next) + for (s_iter = win->struts; s_iter != NULL; s_iter = s_iter->next) { + MetaStrut *cpy = g_new (MetaStrut, 1); + *cpy = *((MetaStrut *)s_iter->data); workspace->all_struts = g_slist_prepend (workspace->all_struts, - s_iter->data); + cpy); + } } g_list_free (windows);