From d3c69c279a3a3ec8ff2abc19f502421483be4660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 20 Jun 2012 22:41:59 -0400 Subject: [PATCH] window: Stop keyboard repeat when we lose keyboard focus --- clients/window.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clients/window.c b/clients/window.c index 762af543..25a80362 100644 --- a/clients/window.c +++ b/clients/window.c @@ -2004,6 +2004,13 @@ static void input_remove_keyboard_focus(struct input *input) { struct window *window = input->keyboard_focus; + struct itimerspec its; + + its.it_interval.tv_sec = 0; + its.it_interval.tv_nsec = 0; + its.it_value.tv_sec = 0; + its.it_value.tv_nsec = 0; + timerfd_settime(input->repeat_timer_fd, 0, &its, NULL); if (!window) return;