int x, y;
if (cursor)
+ g_object_ref (cursor);
+
+ /* Setting the cursor to NULL means that we should use the default cursor */
+ if (!cursor)
{
- buffer = _gdk_wayland_cursor_get_buffer(cursor, &x, &y);
- wl_input_device_attach(wd->device, wd->time, buffer, x, y);
- }
- else
- {
- wl_input_device_attach(wd->device, wd->time, NULL, 0, 0);
+ /* FIXME: Is this the best sensible default ? */
+ cursor = _gdk_wayland_display_get_cursor_for_type (device->display,
+ GDK_LEFT_PTR);
}
+
+ buffer = _gdk_wayland_cursor_get_buffer(cursor, &x, &y);
+ wl_input_device_attach(wd->device, wd->time, buffer, x, y);
+
+ g_object_unref (cursor);
}
static void