input: don’t use seat->kbd_focus as terminal when processing a key press

When converting mouse scroll events to keyboard input (in alternate
scroll mode), we need to use seat->mouse_focus, not seat->kbd_focus.

To enable this, break out key press/release handling code to a
separate function that takes an explicit term argument. Call this
function from keyboard_key(), input_repeat() and in alternate scroll
mode.

Closes #179
This commit is contained in:
Daniel Eklöf 2020-11-03 19:44:51 +01:00
parent 273f105af5
commit c512dc4490
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 27 additions and 15 deletions

View file

@ -29,6 +29,8 @@
* Compilation error _"overflow in conversion from long 'unsigned int'
to 'int' changes value... "_ seen on platforms where the `request`
argument in `ioctl(3)` is an `int` (for example: linux/ppc64).
* Crash when using the mouse in alternate scroll mode in an unfocused
window (https://codeberg.org/dnkl/foot/issues/179).
## 1.5.2