mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
do not leak list.
2007-12-21 Paolo Borelli <pborelli@katamail.com> * src/core/core.c (meta_invalidate_default_icons): do not leak list. * src/core/edge-resistance.c (meta_display_compute_resistance_and_snapping_edges): ditto. * src/core/workspace.c (meta_workspace_index): small cleanup in list handling. svn path=/trunk/; revision=3495
This commit is contained in:
parent
5dc41f8c94
commit
b9e1a9159e
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2007-12-21 Paolo Borelli <pborelli@katamail.com>
|
||||
|
||||
* src/core/core.c (meta_invalidate_default_icons): do not leak list.
|
||||
|
||||
* src/core/edge-resistance.c
|
||||
(meta_display_compute_resistance_and_snapping_edges): ditto.
|
||||
|
||||
* src/core/workspace.c (meta_workspace_index): small cleanup in list
|
||||
handling.
|
||||
|
||||
2007-12-19 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* src/core/display.c (meta_display_open): fix a third warning
|
||||
|
@ -718,19 +718,18 @@ meta_core_increment_event_serial (Display *xdisplay)
|
||||
void
|
||||
meta_invalidate_default_icons (void)
|
||||
{
|
||||
GSList *displays, *windows;
|
||||
GSList *displays;
|
||||
|
||||
for (displays = meta_displays_list ();
|
||||
displays != NULL;
|
||||
displays = displays->next)
|
||||
{
|
||||
GSList *windows, *l;
|
||||
|
||||
for (windows = meta_display_list_windows (displays->data);
|
||||
windows != NULL;
|
||||
windows = windows->next)
|
||||
windows = meta_display_list_windows (displays->data);
|
||||
for (l = windows; l != NULL; l = l->next)
|
||||
{
|
||||
|
||||
MetaWindow *window = (MetaWindow*)windows->data;
|
||||
MetaWindow *window = (MetaWindow*)l->data;
|
||||
|
||||
if (window->icon_cache.origin == USING_FALLBACK_ICON)
|
||||
{
|
||||
|
@ -1091,6 +1091,7 @@ meta_display_compute_resistance_and_snapping_edges (MetaDisplay *display)
|
||||
/*
|
||||
* 4th: Free the extra memory not needed and sort the list
|
||||
*/
|
||||
g_list_free (stacked_windows);
|
||||
/* Free the memory used by the obscuring windows/docks lists */
|
||||
g_slist_free (window_stacking);
|
||||
/* FIXME: Shouldn't there be a helper function to make this one line of code
|
||||
|
@ -357,23 +357,14 @@ meta_workspace_activate (MetaWorkspace *workspace,
|
||||
int
|
||||
meta_workspace_index (MetaWorkspace *workspace)
|
||||
{
|
||||
GList *tmp;
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
i = 0;
|
||||
tmp = workspace->screen->workspaces;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
if (tmp->data == workspace)
|
||||
return i;
|
||||
ret = g_list_index (workspace->screen->workspaces, workspace);
|
||||
|
||||
++i;
|
||||
if (ret < 0)
|
||||
meta_bug ("Workspace does not exist to index!\n");
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
meta_bug ("Workspace does not exist to index!\n");
|
||||
return -1; /* compiler warnings */
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* get windows contained on workspace, including workspace->windows
|
||||
|
Loading…
Reference in New Issue
Block a user