Wayland: Fixed showing created cursors incorrectly before the first redraw.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Fri, 11 Mar 2016 22:09:50 +0100
changeset 10113 991977532d7f
parent 10112 f3c18811079d
child 10114 6740b15172f0
Wayland: Fixed showing created cursors incorrectly before the first redraw.
src/video/wayland/SDL_waylandmouse.c
--- a/src/video/wayland/SDL_waylandmouse.c	Thu Mar 10 21:00:44 2016 +0100
+++ b/src/video/wayland/SDL_waylandmouse.c	Fri Mar 11 22:09:50 2016 +0100
@@ -334,13 +334,13 @@
     {
         Wayland_CursorData *data = cursor->driverdata;
 
-        wl_surface_attach(data->surface, data->buffer, 0, 0);
-        wl_surface_damage(data->surface, 0, 0, data->w, data->h);
-        wl_surface_commit(data->surface);
         wl_pointer_set_cursor (pointer, 0,
                                data->surface,
                                data->hot_x,
                                data->hot_y);
+        wl_surface_attach(data->surface, data->buffer, 0, 0);
+        wl_surface_damage(data->surface, 0, 0, data->w, data->h);
+        wl_surface_commit(data->surface);
     }
     else
     {