summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-02-21 17:19:17 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-02-21 17:19:17 +0800
commita72cbe29be4c74af5b0526212161e4b90625e37e (patch)
treee60a441afd1ab5a56e308c150d0c95a8fd5259fc
parenta6613c9a999b220fa968c8c91c863c4a4d18152c (diff)
downloadcompiz-with-glib-mainloop-a72cbe29be4c74af5b0526212161e4b90625e37e.tar.gz
compiz-with-glib-mainloop-a72cbe29be4c74af5b0526212161e4b90625e37e.tar.bz2
Also store correct pointer type and unref on exit
-rw-r--r--gtk/window-decorator/gtk-window-decorator.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/gtk/window-decorator/gtk-window-decorator.c b/gtk/window-decorator/gtk-window-decorator.c
index 7509b97..1a9aa21 100644
--- a/gtk/window-decorator/gtk-window-decorator.c
+++ b/gtk/window-decorator/gtk-window-decorator.c
@@ -109,16 +109,16 @@ decor_settings_t *settings;
int
main (int argc, char *argv[])
{
- GdkDisplay *gdkdisplay;
- Display *xdisplay;
- GdkScreen *gdkscreen;
- WnckScreen *screen;
- gint i, j, status;
- gboolean replace = FALSE;
- unsigned int nchildren;
- Window root_ret, parent_ret;
- Window *children = NULL;
- decor_t *default_p, *bare_p, *switcher_p;
+ GdkDisplay *gdkdisplay;
+ Display *xdisplay;
+ GdkScreen *gdkscreen;
+ WnckScreen *screen;
+ gint i, j, status;
+ gboolean replace = FALSE;
+ unsigned int nchildren;
+ Window root_ret, parent_ret;
+ Window *children = NULL;
+ decor_frame_t *default_p, *bare_p, *switcher_p;
#ifdef USE_METACITY
char *meta_theme = NULL;
@@ -381,6 +381,9 @@ main (int argc, char *argv[])
initialize_decorations ();
+ /* Keep the default, bare and switcher decorations around
+ * since otherwise they will be spuriously recreated */
+
default_p = gwd_get_decor_frame ("default");
bare_p = gwd_get_decor_frame ("bare");
switcher_p = gwd_get_decor_frame ("switcher");
@@ -396,13 +399,14 @@ main (int argc, char *argv[])
WINDOW_DECORATION_TYPE_PIXMAP |
WINDOW_DECORATION_TYPE_WINDOW);
- /* Keep the default, bare and switcher decorations around
- * since otherwise they will be spuriously recreated */
-
update_default_decorations (gdkscreen);
gtk_main ();
+ gwd_decor_frame_unref (default_p);
+ gwd_decor_frame_unref (bare_p);
+ gwd_decor_frame_unref (switcher_p);
+
free (settings);
return 0;