]> git.eshelyaron.com Git - emacs.git/commitdiff
(kbd_buffer_get_event): Break loop waiting for input
authorMartin Rudalics <rudalics@gmx.at>
Sat, 6 Oct 2007 09:43:17 +0000 (09:43 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Sat, 6 Oct 2007 09:43:17 +0000 (09:43 +0000)
when there's an unread command event.

src/keyboard.c

index c398a85684d21bd74317b3c3da3c10b4be1cf994..538c0a0d1b04e7619fdb2becfe00fcf3c8919e48 100644 (file)
@@ -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