diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-11-22 20:49:50 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-11-22 20:55:46 +0000 |
| commit | 34eac2dbe3d3e4332ebd5ea5ff4307f773b1b6f0 (patch) | |
| tree | 07c22f04e7c856e2da3edc5ee71f49c40a093678 /input.c | |
| parent | term: shutdown: handle *not* being unmapped (diff) | |
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.
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |
