diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-06-21 16:40:53 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-06-21 16:40:53 +0000 |
| commit | 8ecd69c5001414bc914bf89cb290b55150840b56 (patch) | |
| tree | f5b5661620b41c232dda9da3330d57ae90021382 /input.c | |
| parent | csi: fix \e[B - it should move the cursor *down*, not up. (diff) | |
input: stop key repeater when input focus is lost
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -52,10 +52,14 @@ static void keyboard_leave(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, struct wl_surface *surface) { -#if 0 struct terminal *term = data; - term->status = EXIT; -#endif + + mtx_lock(&term->kbd.repeat.mutex); + if (term->kbd.repeat.cmd != REPEAT_EXIT) { + term->kbd.repeat.cmd = REPEAT_STOP; + cnd_signal(&term->kbd.repeat.cond); + } + mtx_unlock(&term->kbd.repeat.mutex); } static void |
