summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2019-11-28 07:00:29 -0500
committerraveit65 <[email protected]>2019-12-04 09:11:19 +0100
commit40fe418fd4b03d58f2606c66a3b82d1ef88c9f31 (patch)
tree3817a3f22163d44220a6d64c57042c2e8f20ec3f
parent8c354d3543c361e88417b593594590b765617ae0 (diff)
downloadmate-panel-40fe418fd4b03d58f2606c66a3b82d1ef88c9f31.tar.bz2
mate-panel-40fe418fd4b03d58f2606c66a3b82d1ef88c9f31.tar.xz
status-notifier: Render menu items as cairo surface
-rw-r--r--applets/notification_area/status-notifier/sn-dbus-menu-item.c10
1 files changed, 8 insertions, 2 deletions
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
{