mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-28 07:58:00 -04:00
wayland: add wayl_bindings_reset()
This function resets (clears) all key- and mouse-bindings associated with the seat.
This commit is contained in:
parent
e1a4b5c5a8
commit
026785b777
2 changed files with 13 additions and 5 deletions
16
wayland.c
16
wayland.c
|
|
@ -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
|
static void
|
||||||
seat_destroy(struct seat *seat)
|
seat_destroy(struct seat *seat)
|
||||||
{
|
{
|
||||||
|
|
@ -175,11 +185,7 @@ seat_destroy(struct seat *seat)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tll_free(seat->mouse.buttons);
|
tll_free(seat->mouse.buttons);
|
||||||
|
wayl_bindings_reset(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);
|
|
||||||
|
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -515,3 +515,5 @@ bool wayl_win_subsurface_new_with_custom_parent(
|
||||||
struct wl_window *win, struct wl_surface *parent,
|
struct wl_window *win, struct wl_surface *parent,
|
||||||
struct wl_surf_subsurf *surf);
|
struct wl_surf_subsurf *surf);
|
||||||
void wayl_win_subsurface_destroy(struct wl_surf_subsurf *surf);
|
void wayl_win_subsurface_destroy(struct wl_surf_subsurf *surf);
|
||||||
|
|
||||||
|
void wayl_bindings_reset(struct seat *seat);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue