mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
input: stop key repeater when input focus is lost
This commit is contained in:
parent
dba3bb820d
commit
8ecd69c500
1 changed files with 7 additions and 3 deletions
10
input.c
10
input.c
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue