wayland: bind cursor-shape-v1 at protocol version 2

cursor-shape-v1 version 2 adds dnd_ask and all_resize, but SDL_SystemCursor does not expose matching cursor types yet. Bind the protocol at version 2 now so SDL negotiates the updated interface correctly while keeping the current cursor mapping unchanged.
This commit is contained in:
rewine
2026-04-14 20:29:57 +08:00
committed by Frank Praznik
parent c00e9c991e
commit 59ee54d136
2 changed files with 20 additions and 5 deletions

View File

@@ -1402,7 +1402,7 @@ static void handle_registry_global(void *data, struct wl_registry *registry, uin
d->input_timestamps_manager = wl_registry_bind(d->registry, id, &zwp_input_timestamps_manager_v1_interface, 1);
Wayland_DisplayInitInputTimestampManager(d);
} else if (SDL_strcmp(interface, wp_cursor_shape_manager_v1_interface.name) == 0) {
d->cursor_shape_manager = wl_registry_bind(d->registry, id, &wp_cursor_shape_manager_v1_interface, 1);
d->cursor_shape_manager = wl_registry_bind(d->registry, id, &wp_cursor_shape_manager_v1_interface, SDL_min(version, 2));
Wayland_DisplayInitCursorShapeManager(d);
} else if (SDL_strcmp(interface, zxdg_exporter_v2_interface.name) == 0) {
d->zxdg_exporter_v2 = wl_registry_bind(d->registry, id, &zxdg_exporter_v2_interface, 1);