summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2005-10-03 19:22:40 +0000
committerElijah Newren <newren@src.gnome.org>2005-10-03 19:22:40 +0000
commit26dbf9856b19c7a1bb037a009022f208180e3dde (patch)
tree4ea4d51dac122ea05d64f016dfa495e7b7e0e921
parentea4cd882853973755ad7bad704f822d3b5b4857d (diff)
downloadmetacity-26dbf9856b19c7a1bb037a009022f208180e3dde.tar.gz
metacity-26dbf9856b19c7a1bb037a009022f208180e3dde.tar.bz2
A combination of a couple memory leaks fixes, from Kjartan, Soeren, and I.
2005-10-03 Elijah Newren <newren@gmail.com> A combination of a couple memory leaks fixes, from Kjartan, Soeren, and I. Fixes #313030. * src/bell.c (meta_bell_flash_screen): call XFreeGC() * src/frames.c (invalidate_cache): free pixels * src/window.c (meta_window_show_menu): call meta_screen_free_workspace_layout()
-rw-r--r--ChangeLog12
-rw-r--r--src/bell.c1
-rw-r--r--src/frames.c7
-rw-r--r--src/window.c2
4 files changed, 17 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 046e919..36eb62b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2005-10-03 Elijah Newren <newren@gmail.com>
+ A combination of a couple memory leaks fixes, from Kjartan,
+ Soeren, and I. Fixes #313030.
+
+ * src/bell.c (meta_bell_flash_screen): call XFreeGC()
+
+ * src/frames.c (invalidate_cache): free pixels
+
+ * src/window.c (meta_window_show_menu): call
+ meta_screen_free_workspace_layout()
+
+2005-10-03 Elijah Newren <newren@gmail.com>
+
Patch from Björn Lindqvist fix the workspace switcher tabpopup to
display the right windows and to fix the
pick-a-new-window-to-focus algorithm in order to not select
diff --git a/src/bell.c b/src/bell.c
index 2d208f7..c46f84f 100644
--- a/src/bell.c
+++ b/src/bell.c
@@ -77,6 +77,7 @@ meta_bell_flash_screen (MetaDisplay *display,
XFlush (display->xdisplay);
XSync (display->xdisplay, False);
XUnmapWindow (display->xdisplay, screen->flash_window);
+ XFreeGC (display->xdisplay, gc);
}
if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK &&
diff --git a/src/frames.c b/src/frames.c
index b816996..03e11d3 100644
--- a/src/frames.c
+++ b/src/frames.c
@@ -322,11 +322,8 @@ invalidate_cache (MetaFrames *frames,
if (pixels->bottom)
g_object_unref (pixels->bottom);
- pixels->top = NULL;
- pixels->bottom = NULL;
- pixels->right = NULL;
- pixels->left = NULL;
-
+ g_free (pixels);
+
g_hash_table_remove (frames->cache, frame);
}
diff --git a/src/window.c b/src/window.c
index fb2ec9c..8789f3e 100644
--- a/src/window.c
+++ b/src/window.c
@@ -6219,6 +6219,8 @@ meta_window_show_menu (MetaWindow *window,
ops |= META_MENU_OP_MOVE_DOWN;
}
+ meta_screen_free_workspace_layout (&layout);
+
if (window->maximized)
ops |= META_MENU_OP_UNMAXIMIZE;
else