wayland: Fix embarassing bug
authorBenjamin Otte <otte@redhat.com>
Sat, 4 Nov 2017 23:05:56 +0000 (00:05 +0100)
committerBenjamin Otte <otte@redhat.com>
Sat, 4 Nov 2017 23:07:18 +0000 (00:07 +0100)
Yes, I did not get to test this code path until now. Because nobody uses
icon surfaces, boo!

gdk/wayland/gdkcursor-wayland.c

index 925e5b1fbb2ff632ceb6828471a60a4b04abe8d6..cc3b5e38a628658a1a868d8caaa3365a5fd21d83 100644 (file)
@@ -214,10 +214,10 @@ _gdk_wayland_cursor_get_buffer (GdkWaylandDisplay *display,
       surface = g_hash_table_lookup (display->cursor_surface_cache, cursor);
       if (surface == NULL)
         {
-          _gdk_wayland_display_create_shm_surface (display,
-                                                   gdk_texture_get_width (texture),
-                                                   gdk_texture_get_height (texture),
-                                                   1);
+          surface = _gdk_wayland_display_create_shm_surface (display,
+                                                             gdk_texture_get_width (texture),
+                                                             gdk_texture_get_height (texture),
+                                                             1);
           
           gdk_texture_download (texture,
                                 cairo_image_surface_get_data (surface),