summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-02-21 17:16:03 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-02-21 17:16:03 +0800
commita6613c9a999b220fa968c8c91c863c4a4d18152c (patch)
treed7347880d09b874df6182358f0c09d0c292a4571
parent881e8de7b46f5977735dbf908e83604bc45a1630 (diff)
downloadcompiz-with-glib-mainloop-a6613c9a999b220fa968c8c91c863c4a4d18152c.tar.gz
compiz-with-glib-mainloop-a6613c9a999b220fa968c8c91c863c4a4d18152c.tar.bz2
Prevent spurious frame creation and deletion
Bare, default and switcher decorations never change and they need to come and go, so keep references to them
-rw-r--r--gtk/window-decorator/gtk-window-decorator.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk/window-decorator/gtk-window-decorator.c b/gtk/window-decorator/gtk-window-decorator.c
index a45487d..7509b97 100644
--- a/gtk/window-decorator/gtk-window-decorator.c
+++ b/gtk/window-decorator/gtk-window-decorator.c
@@ -118,6 +118,7 @@ main (int argc, char *argv[])
unsigned int nchildren;
Window root_ret, parent_ret;
Window *children = NULL;
+ decor_t *default_p, *bare_p, *switcher_p;
#ifdef USE_METACITY
char *meta_theme = NULL;
@@ -380,6 +381,10 @@ main (int argc, char *argv[])
initialize_decorations ();
+ default_p = gwd_get_decor_frame ("default");
+ bare_p = gwd_get_decor_frame ("bare");
+ switcher_p = gwd_get_decor_frame ("switcher");
+
if (!init_settings (screen))
{
free (settings);
@@ -391,6 +396,9 @@ 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 ();