aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 0303ab4fa65..7cd3c570d6c 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -482,6 +482,8 @@ extern char *x_get_keysym_name ();
482 482
483static void record_menu_key (); 483static void record_menu_key ();
484 484
485void swallow_events ();
486
485Lisp_Object Qpolling_period; 487Lisp_Object Qpolling_period;
486 488
487/* List of absolute timers. Appears in order of next scheduled event. */ 489/* List of absolute timers. Appears in order of next scheduled event. */
@@ -1787,9 +1789,15 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
1787 goto reread_first; 1789 goto reread_first;
1788 } 1790 }
1789 1791
1790 if (commandflag >= 0 && !input_pending 1792 if (commandflag >= 0)
1791 && !detect_input_pending_run_timers (0)) 1793 {
1792 redisplay (); 1794 if (input_pending
1795 || detect_input_pending_run_timers (0))
1796 swallow_events (0);
1797
1798 if (!input_pending)
1799 redisplay ();
1800 }
1793 1801
1794 /* Message turns off echoing unless more keystrokes turn it on again. */ 1802 /* Message turns off echoing unless more keystrokes turn it on again. */
1795 if (echo_area_glyphs && *echo_area_glyphs 1803 if (echo_area_glyphs && *echo_area_glyphs