From 40fe418fd4b03d58f2606c66a3b82d1ef88c9f31 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Thu, 28 Nov 2019 07:00:29 -0500 Subject: status-notifier: Render menu items as cairo surface --- applets/notification_area/status-notifier/sn-dbus-menu-item.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'applets/notification_area/status-notifier/sn-dbus-menu-item.c') diff --git a/applets/notification_area/status-notifier/sn-dbus-menu-item.c b/applets/notification_area/status-notifier/sn-dbus-menu-item.c index 2fe587cf..6ed8d2f5 100644 --- a/applets/notification_area/status-notifier/sn-dbus-menu-item.c +++ b/applets/notification_area/status-notifier/sn-dbus-menu-item.c @@ -197,7 +197,10 @@ sn_dbus_menu_item_new (GVariant *props) } else if (item->icon_data) { - image = gtk_image_new_from_pixbuf (item->icon_data); + cairo_surface_t *surface; + surface = gdk_cairo_surface_create_from_pixbuf (item->icon_data, 0, NULL); + image = gtk_image_new_from_surface (surface); + cairo_surface_destroy (surface); } item->item = gtk_image_menu_item_new (); @@ -334,7 +337,10 @@ sn_dbus_menu_item_update_props (SnDBusMenuItem *item, if (item->icon_data) { - image = gtk_image_new_from_pixbuf (item->icon_data); + cairo_surface_t *surface; + surface = gdk_cairo_surface_create_from_pixbuf (item->icon_data, 0, NULL); + image = gtk_image_new_from_surface (surface); + cairo_surface_destroy (surface); } else { -- cgit v1.2.1