1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-31 18:41:20 +00:00

Destroy XKB keymap and state on seat capability change

Wasn't that much of a concern as it would have been disposed of next
time a keyboard got added, but it's still a good thing to do.
This commit is contained in:
Riteo Siuga
2025-11-27 23:02:08 +01:00
parent a79239e332
commit f90a9ad659

View File

@@ -1613,6 +1613,16 @@ void WaylandThread::_wl_seat_on_capabilities(void *data, struct wl_seat *wl_seat
ss->xkb_compose_state = nullptr;
}
if (ss->xkb_keymap) {
xkb_keymap_unref(ss->xkb_keymap);
ss->xkb_keymap = nullptr;
}
if (ss->xkb_state) {
xkb_state_unref(ss->xkb_state);
ss->xkb_state = nullptr;
}
if (ss->wl_keyboard) {
wl_keyboard_destroy(ss->wl_keyboard);
ss->wl_keyboard = nullptr;