From af6b2cdb378c0af700a7f0ebe0310d6f4e0d6176 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 12 Apr 2018 01:29:15 +0200 Subject: [PATCH] testgtk: Don't set cairo surfaces as icons The code expects textures these days, so use those. --- tests/testgtk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/testgtk.c b/tests/testgtk.c index e9b8bcbde6..626104bce3 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -5415,7 +5415,7 @@ create_wmhints (GtkWidget *widget) GtkWidget *box2; GdkSurface *gdk_surface; GdkPixbuf *pixbuf; - cairo_surface_t *surface; + GdkTexture *texture; GList *list; if (!window) @@ -5436,14 +5436,14 @@ create_wmhints (GtkWidget *widget) gdk_surface = gtk_widget_get_surface (window); pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) openfile); - surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, 1, NULL); + texture = gdk_texture_new_for_pixbuf (pixbuf); - list = g_list_prepend (NULL, surface); + list = g_list_prepend (NULL, texture); gtk_window_set_icon_list (GTK_WINDOW (window), list); g_list_free (list); - cairo_surface_destroy (surface); + g_object_unref (texture); g_object_unref (pixbuf); gdk_surface_set_icon_name (gdk_surface, "WMHints Test Icon");