diff options
author | Kim F. Storm <storm@cua.dk> | 2006-06-17 00:11:59 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2006-06-17 00:11:59 +0000 |
commit | 993d4ab6ee5272848d7011f1bbf3c8f5709c36ed (patch) | |
tree | e3951b81fc1db731f02c725ce004f1690edef75c /src/dispnew.c | |
parent | a3efc408be0420c4a8f1d4aec86a26e0bc232042 (diff) | |
download | emacs-993d4ab6ee5272848d7011f1bbf3c8f5709c36ed.tar.gz |
(update_frame): Check for input pending on entry.
(update_window, update_frame_1): Break loop if input is detected.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r-- | src/dispnew.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 43f86a32f4c..df92fc395d2 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -3849,6 +3849,12 @@ update_frame (f, force_p, inhibit_hairy_id_p) double p = XFLOATINT (Vredisplay_preemption_period); int sec, usec; + if (detect_input_pending_ignore_squeezables ()) + { + paused_p = 1; + goto do_pause; + } + sec = (int) p; usec = (p - sec) * 1000000; @@ -3936,6 +3942,7 @@ update_frame (f, force_p, inhibit_hairy_id_p) #endif } + do_pause: /* Reset flags indicating that a window should be updated. */ set_window_update_flags (root_window, 0); @@ -4262,7 +4269,8 @@ update_window (w, force_p) if (EMACS_TIME_NEG_P (dif)) { EMACS_ADD_TIME (preemption_next_check, tm, preemption_period); - detect_input_pending_ignore_squeezables (); + if (detect_input_pending_ignore_squeezables ()) + break; } } #else @@ -5288,7 +5296,8 @@ update_frame_1 (f, force_p, inhibit_id_p) if (EMACS_TIME_NEG_P (dif)) { EMACS_ADD_TIME (preemption_next_check, tm, preemption_period); - detect_input_pending_ignore_squeezables (); + if (detect_input_pending_ignore_squeezables ()) + break; } } #else |