mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-24 09:05:48 -04:00
wayland: use key_bindings_destroy() to destroy the mouse bindings
This commit is contained in:
parent
dcd79065c8
commit
e1a4b5c5a8
1 changed files with 7 additions and 3 deletions
10
wayland.c
10
wayland.c
|
|
@ -158,7 +158,12 @@ static void
|
||||||
key_bindings_destroy(key_binding_list_t *bindings)
|
key_bindings_destroy(key_binding_list_t *bindings)
|
||||||
{
|
{
|
||||||
tll_foreach(*bindings, it) {
|
tll_foreach(*bindings, it) {
|
||||||
tll_free(it->item.k.key_codes);
|
struct key_binding *bind = &it->item;
|
||||||
|
switch (bind->type) {
|
||||||
|
case KEY_BINDING: tll_free(it->item.k.key_codes); break;
|
||||||
|
case MOUSE_BINDING: break;
|
||||||
|
}
|
||||||
|
|
||||||
tll_remove(*bindings, it);
|
tll_remove(*bindings, it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -174,8 +179,7 @@ seat_destroy(struct seat *seat)
|
||||||
key_bindings_destroy(&seat->kbd.bindings.key);
|
key_bindings_destroy(&seat->kbd.bindings.key);
|
||||||
key_bindings_destroy(&seat->kbd.bindings.search);
|
key_bindings_destroy(&seat->kbd.bindings.search);
|
||||||
key_bindings_destroy(&seat->kbd.bindings.url);
|
key_bindings_destroy(&seat->kbd.bindings.url);
|
||||||
|
key_bindings_destroy(&seat->mouse.bindings);
|
||||||
tll_free(seat->mouse.bindings);
|
|
||||||
|
|
||||||
if (seat->kbd.xkb_compose_state != NULL)
|
if (seat->kbd.xkb_compose_state != NULL)
|
||||||
xkb_compose_state_unref(seat->kbd.xkb_compose_state);
|
xkb_compose_state_unref(seat->kbd.xkb_compose_state);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue