input: stop key repeater when input focus is lost

This commit is contained in:
Daniel Eklöf 2019-06-21 18:40:53 +02:00
parent dba3bb820d
commit 8ecd69c500
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

10
input.c
View file

@ -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