summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-04-12 01:29:15 +0200
committerBenjamin Otte <otte@redhat.com>2018-04-12 14:03:48 +0200
commitaf6b2cdb378c0af700a7f0ebe0310d6f4e0d6176 (patch)
tree8bed3e921548734294666a45cceb409e6fc941ac /tests
parent3a1c69dce6f656606d1fc1f30b0733d5c71942f4 (diff)
downloadgtk+-af6b2cdb378c0af700a7f0ebe0310d6f4e0d6176.tar.gz
testgtk: Don't set cairo surfaces as icons
The code expects textures these days, so use those.
Diffstat (limited to 'tests')
-rw-r--r--tests/testgtk.c8
1 files 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");