add a copy of each strut in a window to the workspace's strut list,

2008-08-18  Eric Piel  <e.a.b.piel@tudelft.nl>

        * 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
This commit is contained in:
Eric Piel 2008-08-18 02:48:36 +00:00 committed by Thomas James Alexander Thurman
parent 4fb40b57a9
commit 233237f098
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2008-08-18 Eric Piel <e.a.b.piel@tudelft.nl>
* 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 <ted@midg3t.net> 2008-08-16 Ted Percival <ted@midg3t.net>
Ensure the user_rect is set sanely for windows that start maximized. Ensure the user_rect is set sanely for windows that start maximized.

View File

@ -514,9 +514,12 @@ ensure_work_areas_validated (MetaWorkspace *workspace)
MetaWindow *win = tmp->data; MetaWindow *win = tmp->data;
GSList *s_iter; 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, workspace->all_struts = g_slist_prepend (workspace->all_struts,
s_iter->data); cpy);
}
} }
g_list_free (windows); g_list_free (windows);