From 15d814840f6ce72ddb14824f06ad474e8696dbc4 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sat, 6 Oct 2007 09:43:17 +0000 Subject: [PATCH] (kbd_buffer_get_event): Break loop waiting for input when there's an unread command event. --- src/keyboard.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/keyboard.c b/src/keyboard.c index c398a85684d..538c0a0d1b0 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3995,6 +3995,12 @@ kbd_buffer_get_event (kbp, used_mouse_menu, end_time) /* Wait until there is input available. */ for (;;) { + /* Break loop if there's an unread command event. Needed in + moused window autoselection which uses a timer to insert such + events. */ + if (CONSP (Vunread_command_events)) + break; + if (kbd_fetch_ptr != kbd_store_ptr) break; #ifdef HAVE_MOUSE -- 2.39.2