mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
wayland: Eliminate redundant keyboard and mouse removals
The SDL keyboard and mouse will be removed when destroying the seat, so there is no need to preemptively remove them.
This commit is contained in:
@@ -1452,17 +1452,12 @@ static void handle_registry_remove_global(void *data, struct wl_registry *regist
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct SDL_WaylandSeat *seat, *temp;
|
SDL_WaylandSeat *seat, *temp;
|
||||||
wl_list_for_each_safe (seat, temp, &d->seat_list, link)
|
wl_list_for_each_safe (seat, temp, &d->seat_list, link)
|
||||||
{
|
{
|
||||||
if (seat->registry_id == id) {
|
if (seat->registry_id == id) {
|
||||||
if (seat->keyboard.wl_keyboard) {
|
|
||||||
SDL_RemoveKeyboard(seat->keyboard.sdl_id);
|
|
||||||
}
|
|
||||||
if (seat->pointer.wl_pointer) {
|
|
||||||
SDL_RemoveMouse(seat->pointer.sdl_id);
|
|
||||||
}
|
|
||||||
Wayland_SeatDestroy(seat, false);
|
Wayland_SeatDestroy(seat, false);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user