mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
keyboard repeat: pass current input serial to keyboard_key()
This fixes an assertion when holding in ctrl+shift+c (copy to clipboard); subsequent "presses" would set the clipboard serial to 0, which we would then assert on in the next iteration when we tried to cancel the previous copy.
This commit is contained in:
parent
ee45c48deb
commit
34eac2dbe3
1 changed files with 3 additions and 1 deletions
4
input.c
4
input.c
|
|
@ -153,6 +153,7 @@ keyboard_key(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial,
|
|||
{
|
||||
struct wayland *wayl = data;
|
||||
struct terminal *term = wayl->focused;
|
||||
|
||||
assert(term != NULL);
|
||||
|
||||
const xkb_mod_mask_t ctrl = 1 << wayl->kbd.mod_ctrl;
|
||||
|
|
@ -382,7 +383,7 @@ const struct wl_keyboard_listener keyboard_listener = {
|
|||
void
|
||||
input_repeat(struct wayland *wayl, uint32_t key)
|
||||
{
|
||||
keyboard_key(wayl, NULL, 0, 0, key, XKB_KEY_DOWN);
|
||||
keyboard_key(wayl, NULL, wayl->input_serial, 0, key, XKB_KEY_DOWN);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -418,6 +419,7 @@ wl_pointer_motion(void *data, struct wl_pointer *wl_pointer,
|
|||
{
|
||||
struct wayland *wayl = data;
|
||||
struct terminal *term = wayl->moused;
|
||||
|
||||
assert(term != NULL);
|
||||
|
||||
int x = wl_fixed_to_int(surface_x) * term->scale;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue