Hi,

as the subject says, the patch changes all ref/unref functions to their gobject 
counterparts.

Gerd.
diff --git a/gtk/window-decorator/gtk-window-decorator.c b/gtk/window-decorator/gtk-window-decorator.c
index 7eaeba7..a6ad06c 100644
--- a/gtk/window-decorator/gtk-window-decorator.c
+++ b/gtk/window-decorator/gtk-window-decorator.c
@@ -31,6 +31,10 @@
 #include <X11/extensions/Xrender.h>
 #include <X11/Xregion.h>
 
+#ifndef GDK_DISABLE_DEPRECATED
+#define GDK_DISABLE_DEPRECATED
+#endif
+
 #ifndef GTK_DISABLE_DEPRECATED
 #define GTK_DISABLE_DEPRECATED
 #endif
@@ -663,12 +667,12 @@ create_pixmap (int w,
     colormap = gdk_colormap_new (visual, FALSE);
     if (!colormap)
     {
-	gdk_pixmap_unref (pixmap);
+	g_object_unref (G_OBJECT (pixmap));
 	return NULL;
     }
 
     gdk_drawable_set_colormap (GDK_DRAWABLE (pixmap), colormap);
-    gdk_colormap_unref (colormap);
+    g_object_unref (G_OBJECT (colormap));
 
     return pixmap;
 }
@@ -2009,7 +2013,7 @@ meta_draw_window_decoration (decor_t *d)
 
 	cairo_destroy (cr);
 
-	gdk_pixmap_unref (pixmap);
+	g_object_unref (G_OBJECT (pixmap));
 
 	XRenderFreePicture (xdisplay, src);
     }
@@ -2108,7 +2112,7 @@ meta_draw_window_decoration (decor_t *d)
 
 	cairo_destroy (cr);
 
-	gdk_pixmap_unref (pixmap);
+	g_object_unref (G_OBJECT (pixmap));
 
 	XRenderFreePicture (xdisplay, src);
     }
@@ -2569,7 +2573,7 @@ update_default_decorations (GdkScreen *screen)
     d.draw = theme_draw_window_decoration;
 
     if (decor_normal_pixmap)
-	gdk_pixmap_unref (decor_normal_pixmap);
+	g_object_unref (G_OBJECT (decor_normal_pixmap));
 
     nQuad = decor_set_lSrStSbS_window_quads (quads, d.context,
 					     &d.border_layout);
@@ -2598,7 +2602,7 @@ update_default_decorations (GdkScreen *screen)
     }
 
     if (decor_active_pixmap)
-	gdk_pixmap_unref (decor_active_pixmap);
+	g_object_unref (G_OBJECT (decor_active_pixmap));
 
     decor_active_pixmap = create_pixmap (d.width, d.height);
     if (decor_active_pixmap)
@@ -3142,19 +3146,19 @@ update_window_decoration_icon (WnckWindow *win)
 
     if (d->icon_pixmap)
     {
-	gdk_pixmap_unref (d->icon_pixmap);
+	g_object_unref (G_OBJECT (d->icon_pixmap));
 	d->icon_pixmap = NULL;
     }
 
     if (d->icon_pixbuf)
-	gdk_pixbuf_unref (d->icon_pixbuf);
+	g_object_unref (G_OBJECT (d->icon_pixbuf));
 
     d->icon_pixbuf = wnck_window_get_mini_icon (win);
     if (d->icon_pixbuf)
     {
 	cairo_t	*cr;
 
-	gdk_pixbuf_ref (d->icon_pixbuf);
+	g_object_ref (G_OBJECT (d->icon_pixbuf));
 
 	d->icon_pixmap = pixmap_new_from_pixbuf (d->icon_pixbuf);
 	cr = gdk_cairo_create (GDK_DRAWABLE (d->icon_pixmap));
@@ -3352,7 +3356,7 @@ update_window_decoration_size (WnckWindow *win)
     buffer_pixmap = create_pixmap (width, height);
     if (!buffer_pixmap)
     {
-	gdk_pixmap_unref (pixmap);
+	g_object_unref (G_OBJECT (pixmap));
 	return FALSE;
     }
 
@@ -3360,13 +3364,13 @@ update_window_decoration_size (WnckWindow *win)
 				    xformat, 0, NULL);
 
     if (d->pixmap)
-	gdk_pixmap_unref (d->pixmap);
+	g_object_unref (G_OBJECT (d->pixmap));
 
     if (d->buffer_pixmap)
-	gdk_pixmap_unref (d->buffer_pixmap);
+	g_object_unref (G_OBJECT (d->buffer_pixmap));
 
     if (d->gc)
-	gdk_gc_unref (d->gc);
+	g_object_unref (G_OBJECT (d->gc));
 
     if (d->picture)
 	XRenderFreePicture (xdisplay, d->picture);
@@ -3491,13 +3495,13 @@ update_switcher_window (WnckWindow *win,
 
     if (!d->pixmap && switcher_pixmap)
     {
-	gdk_pixmap_ref (switcher_pixmap);
+	g_object_ref (G_OBJECT (switcher_pixmap));
 	d->pixmap = switcher_pixmap;
     }
 
     if (!d->buffer_pixmap && switcher_buffer_pixmap)
     {
-	gdk_pixmap_ref (switcher_buffer_pixmap);
+	g_object_ref (G_OBJECT (switcher_buffer_pixmap));
 	d->buffer_pixmap = switcher_buffer_pixmap;
     }
 
@@ -3595,24 +3599,24 @@ update_switcher_window (WnckWindow *win,
     buffer_pixmap = create_pixmap (width, height);
     if (!buffer_pixmap)
     {
-	gdk_pixmap_unref (pixmap);
+	g_object_unref (G_OBJECT (pixmap));
 	return FALSE;
     }
 
     if (switcher_pixmap)
-	gdk_pixmap_unref (switcher_pixmap);
+	g_object_unref (G_OBJECT (switcher_pixmap));
 
     if (switcher_buffer_pixmap)
-	gdk_pixmap_unref (switcher_buffer_pixmap);
+	g_object_unref (G_OBJECT (switcher_buffer_pixmap));
 
     if (d->pixmap)
-	gdk_pixmap_unref (d->pixmap);
+	g_object_unref (G_OBJECT (d->pixmap));
 
     if (d->buffer_pixmap)
-	gdk_pixmap_unref (d->buffer_pixmap);
+	g_object_unref (G_OBJECT (d->buffer_pixmap));
 
     if (d->gc)
-	gdk_gc_unref (d->gc);
+	g_object_unref (G_OBJECT (d->gc));
 
     if (d->picture)
 	XRenderFreePicture (xdisplay, d->picture);
@@ -3623,8 +3627,8 @@ update_switcher_window (WnckWindow *win,
     switcher_width  = width;
     switcher_height = height;
 
-    gdk_pixmap_ref (pixmap);
-    gdk_pixmap_ref (buffer_pixmap);
+    g_object_ref (G_OBJECT (pixmap));
+    g_object_ref (G_OBJECT (buffer_pixmap));
 
     d->pixmap	     = pixmap;
     d->buffer_pixmap = buffer_pixmap;
@@ -3653,19 +3657,19 @@ remove_frame_window (WnckWindow *win)
 
     if (d->pixmap)
     {
-	gdk_pixmap_unref (d->pixmap);
+	g_object_unref (G_OBJECT (d->pixmap));
 	d->pixmap = NULL;
     }
 
     if (d->buffer_pixmap)
     {
-	gdk_pixmap_unref (d->buffer_pixmap);
+	g_object_unref (G_OBJECT (d->buffer_pixmap));
 	d->buffer_pixmap = NULL;
     }
 
     if (d->gc)
     {
-	gdk_gc_unref (d->gc);
+	g_object_unref (G_OBJECT (d->gc));
 	d->gc = NULL;
     }
 
@@ -3695,13 +3699,13 @@ remove_frame_window (WnckWindow *win)
 
     if (d->icon_pixmap)
     {
-	gdk_pixmap_unref (d->icon_pixmap);
+	g_object_unref (G_OBJECT (d->icon_pixmap));
 	d->icon_pixmap = NULL;
     }
 
     if (d->icon_pixbuf)
     {
-	gdk_pixbuf_unref (d->icon_pixbuf);
+	g_object_unref (G_OBJECT (d->icon_pixbuf));
 	d->icon_pixbuf = NULL;
     }
 
@@ -5388,7 +5392,7 @@ draw_border_shape (Display	   *xdisplay,
 			  width - c->left_space - c->right_space,
 			  height - c->top_space - c->bottom_space);
 
-    gdk_pixmap_unref (d.pixmap);
+    g_object_unref (G_OBJECT (d.pixmap));
 }
 
 static int
_______________________________________________
compiz mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/compiz

Reply via email to