diff -rup notification-daemon-0.3.7/src/themes/ubuntu/theme.c notification-daemon-0.3.7.new/src/themes/ubuntu/theme.c --- notification-daemon-0.3.7/src/themes/ubuntu/theme.c 2007-04-03 01:29:05.000000000 +0200 +++ notification-daemon-0.3.7.new/src/themes/ubuntu/theme.c 2007-04-03 01:26:57.000000000 +0200 @@ -199,6 +199,8 @@ draw_border(GtkWidget *win, GdkEventExpo // get the tooltip bg color and use it for the notifications GtkTooltips *tips = gtk_tooltips_new(); + g_object_ref_sink (tips); + // create a "fake" widget here to that we can attach the tips too // and destory afterwards (to make sure we don't create a mem-leak // for the tips) @@ -209,6 +211,7 @@ draw_border(GtkWidget *win, GdkEventExpo GtkStyle *style = gtk_widget_get_style(tips->tip_window); GdkColor bg_color = style->bg[GTK_STATE_NORMAL]; gtk_widget_destroy(fake); + g_object_unref(tips); cairo_set_source_rgb(cr, bg_color.red/65535.0, @@ -242,6 +245,9 @@ draw_border(GtkWidget *win, GdkEventExpo cairo_fill(mask_cr); gdk_window_shape_combine_mask (win->window, (GdkBitmap *) mask, 0, 0); + cairo_destroy (cr); + g_object_unref (mask); + return FALSE; }