wayland: Don't try to set the seat cursor when no pointer object exists

This commit is contained in:
Frank Praznik
2026-01-23 08:27:46 -05:00
parent 7fe30b04bf
commit 79b40ad397
+2
View File
@@ -1189,6 +1189,7 @@ static bool Wayland_ShowCursor(SDL_Cursor *cursor)
Wayland_PointerObject obj; Wayland_PointerObject obj;
wl_list_for_each (seat, &d->seat_list, link) { wl_list_for_each (seat, &d->seat_list, link) {
if (seat->pointer.wl_pointer) {
obj.wl_pointer = seat->pointer.wl_pointer; obj.wl_pointer = seat->pointer.wl_pointer;
obj.is_pointer = true; obj.is_pointer = true;
if (mouse->focus && mouse->focus->internal == seat->pointer.focus) { if (mouse->focus && mouse->focus->internal == seat->pointer.focus) {
@@ -1196,6 +1197,7 @@ static bool Wayland_ShowCursor(SDL_Cursor *cursor)
} else if (!seat->pointer.focus) { } else if (!seat->pointer.focus) {
Wayland_CursorStateResetCursor(&seat->pointer.cursor_state); Wayland_CursorStateResetCursor(&seat->pointer.cursor_state);
} }
}
SDL_WaylandPenTool *tool; SDL_WaylandPenTool *tool;
wl_list_for_each(tool, &seat->tablet.tool_list, link) { wl_list_for_each(tool, &seat->tablet.tool_list, link) {