mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-07 04:34:03 -05:00
input: don’t ignore keyboard enter/leave events when there’s no keymap
The compositor _usually_ sends the keymap event *before* the enter event. But not always. Not (yet) having a keymap is not a reason to ignore the enter event (now, on the other hand, getting a key press/release event without a keymap is a compositor bug). Closes #1097
This commit is contained in:
parent
206e9a1050
commit
d58290ea12
2 changed files with 3 additions and 6 deletions
|
|
@ -80,9 +80,12 @@
|
||||||
* Workaround for buggy compositors (e.g. some versions of GNOME)
|
* Workaround for buggy compositors (e.g. some versions of GNOME)
|
||||||
allowing drag-and-drops even though foot has reported it does not
|
allowing drag-and-drops even though foot has reported it does not
|
||||||
support the offered mime-types ([#1092][1092]).
|
support the offered mime-types ([#1092][1092]).
|
||||||
|
* Keyboard enter/leave events being ignored if there is no keymap
|
||||||
|
([#1097][1097]).
|
||||||
|
|
||||||
[1055]: https://codeberg.org/dnkl/foot/issues/1055
|
[1055]: https://codeberg.org/dnkl/foot/issues/1055
|
||||||
[1092]: https://codeberg.org/dnkl/foot/issues/1092
|
[1092]: https://codeberg.org/dnkl/foot/issues/1092
|
||||||
|
[1097]: https://codeberg.org/dnkl/foot/issues/1097
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
6
input.c
6
input.c
|
|
@ -591,9 +591,6 @@ keyboard_enter(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial,
|
||||||
LOG_DBG("%s: keyboard_enter: keyboard=%p, serial=%u, surface=%p",
|
LOG_DBG("%s: keyboard_enter: keyboard=%p, serial=%u, surface=%p",
|
||||||
seat->name, (void *)wl_keyboard, serial, (void *)surface);
|
seat->name, (void *)wl_keyboard, serial, (void *)surface);
|
||||||
|
|
||||||
if (seat->kbd.xkb == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
term_kbd_focus_in(term);
|
term_kbd_focus_in(term);
|
||||||
seat->kbd_focus = term;
|
seat->kbd_focus = term;
|
||||||
seat->kbd.serial = serial;
|
seat->kbd.serial = serial;
|
||||||
|
|
@ -653,9 +650,6 @@ keyboard_leave(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial,
|
||||||
LOG_DBG("keyboard_leave: keyboard=%p, serial=%u, surface=%p",
|
LOG_DBG("keyboard_leave: keyboard=%p, serial=%u, surface=%p",
|
||||||
(void *)wl_keyboard, serial, (void *)surface);
|
(void *)wl_keyboard, serial, (void *)surface);
|
||||||
|
|
||||||
if (seat->kbd.xkb == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
xassert(
|
xassert(
|
||||||
seat->kbd_focus == NULL ||
|
seat->kbd_focus == NULL ||
|
||||||
surface == NULL || /* Seen on Sway 1.2 */
|
surface == NULL || /* Seen on Sway 1.2 */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue