diff --git a/xfce4-notifyd/xfce-notify-daemon.c b/xfce4-notifyd/xfce-notify-daemon.c index d7f21d0..80c9ece 100644 --- a/xfce4-notifyd/xfce-notify-daemon.c +++ b/xfce4-notifyd/xfce-notify-daemon.c @@ -662,9 +662,14 @@ xfce_notify_daemon_window_size_allocate(GtkWidget *widget, XfceNotifyDaemon *xndaemon = user_data; XfceNotifyWindow *window = XFCE_NOTIFY_WINDOW(widget); GdkScreen *p_screen = NULL; + GdkDevice *pointer; +#if GTK_CHECK_VERSION (3, 20, 0) + GdkSeat *seat; +#else GdkScreen *widget_screen; GdkDisplay *display; - GdkDevice *pointer; + GdkDeviceManager *device_manager; +#endif gint x, y, monitor, screen_n, max_width; GdkRectangle *geom_tmp, geom, initial, widget_geom; GList *list; @@ -694,16 +699,13 @@ xfce_notify_daemon_window_size_allocate(GtkWidget *widget, xndaemon->reserved_rectangles[screen_n][monitor] = old_list; } - /* All these calls are, well to get replace the deprecated - * gdk_display_get_pointer function! Go GTK...*/ - widget_screen = gtk_widget_get_screen (widget); - display = gdk_screen_get_display (widget_screen); - #if GTK_CHECK_VERSION (3, 20, 0) - GdkSeat *seat = gdk_display_get_default_seat (gdk_display_get_default()); + seat = gdk_display_get_default_seat (gdk_display_get_default()); pointer = gdk_seat_get_pointer (seat); #else - GdkDeviceManager *device_manager = gdk_display_get_device_manager (display); + widget_screen = gtk_widget_get_screen (widget); + display = gdk_screen_get_display (widget_screen); + device_manager = gdk_display_get_device_manager (display); pointer = gdk_device_manager_get_client_pointer (device_manager); #endif @@ -1040,7 +1042,7 @@ static gboolean notify_notify (XfceNotifyGBus *skeleton, XfceNotifyDaemon *xndaemon) { XfceNotifyWindow *window; - GdkPixbuf *pix; + GdkPixbuf *pix = NULL; GVariant *image_data = NULL; const gchar *desktop_id = NULL; gint value_hint = 0; @@ -1094,6 +1096,9 @@ static gboolean notify_notify (XfceNotifyGBus *skeleton, } else if (g_strcmp0 (key, "x-canonical-private-icon-only") == 0) x_canonical = TRUE; + + g_variant_unref (value); + g_variant_unref (item); } if(expire_timeout == -1) @@ -1149,6 +1154,7 @@ static gboolean notify_notify (XfceNotifyGBus *skeleton, xfce_notify_window_set_icon_pixbuf(window, pix); g_object_unref(G_OBJECT(pix)); } + g_variant_unref (image_data); } else { if(desktop_id) { gchar *resource = g_strdup_printf("applications%c%s.desktop", diff --git a/xfce4-notifyd/xfce-notify-window.c b/xfce4-notifyd/xfce-notify-window.c index 3b72ddd..e7183b7 100644 --- a/xfce4-notifyd/xfce-notify-window.c +++ b/xfce4-notifyd/xfce-notify-window.c @@ -494,6 +494,7 @@ static gboolean xfce_notify_window_draw (GtkWidget *widget, * if this is a pixel or two off here and there */ gtk_widget_input_shape_combine_region(widget, region); + cairo_surface_destroy (surface); cairo_region_destroy (region); GTK_WIDGET_CLASS (xfce_notify_window_parent_class)->draw (widget, cr); @@ -781,7 +782,7 @@ xfce_notify_window_set_icon_name(XfceNotifyWindow *window, if (icon_name && *icon_name) { gint w, h; - GdkPixbuf *pix; + GdkPixbuf *pix = NULL; gtk_icon_size_lookup(GTK_ICON_SIZE_DIALOG, &w, &h);