mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-31 07:11:09 -04:00
input: close fd on no/unrecognized keymap format
This commit is contained in:
parent
6e2bdd663a
commit
5286808b6c
2 changed files with 4 additions and 0 deletions
|
|
@ -91,6 +91,8 @@
|
||||||
space inserted at the end of the current line.
|
space inserted at the end of the current line.
|
||||||
* Wrong key bindings executed when using alternative keyboard layouts
|
* Wrong key bindings executed when using alternative keyboard layouts
|
||||||
([#1929][1929]).
|
([#1929][1929]).
|
||||||
|
* Foot not closing file descriptors for unrecognized or `no_keymap`
|
||||||
|
keymaps.
|
||||||
|
|
||||||
[1918]: https://codeberg.org/dnkl/foot/issues/1918
|
[1918]: https://codeberg.org/dnkl/foot/issues/1918
|
||||||
[1929]: https://codeberg.org/dnkl/foot/issues/1929
|
[1929]: https://codeberg.org/dnkl/foot/issues/1929
|
||||||
|
|
|
||||||
2
input.c
2
input.c
|
|
@ -527,6 +527,7 @@ keyboard_keymap(void *data, struct wl_keyboard *wl_keyboard,
|
||||||
/* Verify keymap is in a format we understand */
|
/* Verify keymap is in a format we understand */
|
||||||
switch ((enum wl_keyboard_keymap_format)format) {
|
switch ((enum wl_keyboard_keymap_format)format) {
|
||||||
case WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP:
|
case WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP:
|
||||||
|
close(fd);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1:
|
case WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1:
|
||||||
|
|
@ -534,6 +535,7 @@ keyboard_keymap(void *data, struct wl_keyboard *wl_keyboard,
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_WARN("unrecognized keymap format: %u", format);
|
LOG_WARN("unrecognized keymap format: %u", format);
|
||||||
|
close(fd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue