diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-02-07 18:52:15 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-02-09 16:51:05 +0000 |
| commit | 026785b777fa2f9cb50a23db4c26e39a154ce4c3 (patch) | |
| tree | cebd657f180ae7835db16773bb02e5be1c2ffdfd /wayland.c | |
| parent | wayland: use key_bindings_destroy() to destroy the mouse bindings (diff) | |
wayland: add wayl_bindings_reset()
This function resets (clears) all key- and mouse-bindings associated
with the seat.
Diffstat (limited to 'wayland.c')
| -rw-r--r-- | wayland.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -168,6 +168,16 @@ key_bindings_destroy(key_binding_list_t *bindings) } } +void +wayl_bindings_reset(struct seat *seat) +{ + + key_bindings_destroy(&seat->kbd.bindings.key); + key_bindings_destroy(&seat->kbd.bindings.search); + key_bindings_destroy(&seat->kbd.bindings.url); + key_bindings_destroy(&seat->mouse.bindings); +} + static void seat_destroy(struct seat *seat) { @@ -175,11 +185,7 @@ seat_destroy(struct seat *seat) return; tll_free(seat->mouse.buttons); - - key_bindings_destroy(&seat->kbd.bindings.key); - key_bindings_destroy(&seat->kbd.bindings.search); - key_bindings_destroy(&seat->kbd.bindings.url); - key_bindings_destroy(&seat->mouse.bindings); + wayl_bindings_reset(seat); if (seat->kbd.xkb_compose_state != NULL) xkb_compose_state_unref(seat->kbd.xkb_compose_state); |
