summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Balneaves <[email protected]>2013-05-14 22:56:16 -0500
committerScott Balneaves <[email protected]>2013-05-14 22:56:16 -0500
commit1450d60b21ab2d20a47dfde8f6ef9f5b952818b9 (patch)
treeda9ea4af5b139b51591ed02e5e056e5f46d3e4e3 /src
parent211d77058a63db3017a0b2d91131876c897ebb4e (diff)
downloadmarco-1450d60b21ab2d20a47dfde8f6ef9f5b952818b9.tar.bz2
marco-1450d60b21ab2d20a47dfde8f6ef9f5b952818b9.tar.xz
Fix memory leak in marco. Cribbed from https://git.gnome.org/browse/metacity/commit/?id=d2b82ba621df8693e560bf0e10c6c56d155cb107
Diffstat (limited to 'src')
-rw-r--r--src/core/display.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/core/display.c b/src/core/display.c
index a66dfc9f..a7ace1b7 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -4596,34 +4596,35 @@ meta_display_get_tab_list (MetaDisplay *display,
tmp = tmp->next;
}
}
-
+
for (l = workspace_list; l != NULL; l = l->next)
{
GList *tmp;
-
+
workspace = l->data;
-
+
tmp = workspace->mru_list;
while (tmp != NULL)
{
MetaWindow *window = tmp->data;
-
+
if (window->minimized &&
window->screen == screen &&
IN_TAB_CHAIN (window, type))
tab_list = g_list_prepend (tab_list, window);
-
+
tmp = tmp->next;
}
}
-
+
tab_list = g_list_reverse (tab_list);
-
+
{
- GSList *tmp;
+ GSList *windows, *tmp;
MetaWindow *l_window;
-
- tmp = meta_display_list_windows (display);
+
+ windows = meta_display_list_windows (display);
+ tmp = windows;
/* Go through all windows */
while (tmp != NULL)
@@ -4631,9 +4632,9 @@ meta_display_get_tab_list (MetaDisplay *display,
l_window=tmp->data;
/* Check to see if it demands attention */
- if (l_window->wm_state_demands_attention &&
+ if (l_window->wm_state_demands_attention &&
l_window->workspace!=active_workspace &&
- IN_TAB_CHAIN (l_window, type))
+ IN_TAB_CHAIN (l_window, type))
{
/* if it does, add it to the popup */
tab_list = g_list_prepend (tab_list, l_window);
@@ -4641,8 +4642,9 @@ meta_display_get_tab_list (MetaDisplay *display,
tmp = tmp->next;
} /* End while tmp!=NULL */
+ g_slist_free (windows);
}
-
+
return tab_list;
}