aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2006-06-17 00:11:59 +0000
committerKim F. Storm2006-06-17 00:11:59 +0000
commit993d4ab6ee5272848d7011f1bbf3c8f5709c36ed (patch)
treee3951b81fc1db731f02c725ce004f1690edef75c
parenta3efc408be0420c4a8f1d4aec86a26e0bc232042 (diff)
downloademacs-993d4ab6ee5272848d7011f1bbf3c8f5709c36ed.tar.gz
emacs-993d4ab6ee5272848d7011f1bbf3c8f5709c36ed.zip
(update_frame): Check for input pending on entry.
(update_window, update_frame_1): Break loop if input is detected.
-rw-r--r--src/dispnew.c13
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)
3849 double p = XFLOATINT (Vredisplay_preemption_period); 3849 double p = XFLOATINT (Vredisplay_preemption_period);
3850 int sec, usec; 3850 int sec, usec;
3851 3851
3852 if (detect_input_pending_ignore_squeezables ())
3853 {
3854 paused_p = 1;
3855 goto do_pause;
3856 }
3857
3852 sec = (int) p; 3858 sec = (int) p;
3853 usec = (p - sec) * 1000000; 3859 usec = (p - sec) * 1000000;
3854 3860
@@ -3936,6 +3942,7 @@ update_frame (f, force_p, inhibit_hairy_id_p)
3936#endif 3942#endif
3937 } 3943 }
3938 3944
3945 do_pause:
3939 /* Reset flags indicating that a window should be updated. */ 3946 /* Reset flags indicating that a window should be updated. */
3940 set_window_update_flags (root_window, 0); 3947 set_window_update_flags (root_window, 0);
3941 3948
@@ -4262,7 +4269,8 @@ update_window (w, force_p)
4262 if (EMACS_TIME_NEG_P (dif)) 4269 if (EMACS_TIME_NEG_P (dif))
4263 { 4270 {
4264 EMACS_ADD_TIME (preemption_next_check, tm, preemption_period); 4271 EMACS_ADD_TIME (preemption_next_check, tm, preemption_period);
4265 detect_input_pending_ignore_squeezables (); 4272 if (detect_input_pending_ignore_squeezables ())
4273 break;
4266 } 4274 }
4267 } 4275 }
4268#else 4276#else
@@ -5288,7 +5296,8 @@ update_frame_1 (f, force_p, inhibit_id_p)
5288 if (EMACS_TIME_NEG_P (dif)) 5296 if (EMACS_TIME_NEG_P (dif))
5289 { 5297 {
5290 EMACS_ADD_TIME (preemption_next_check, tm, preemption_period); 5298 EMACS_ADD_TIME (preemption_next_check, tm, preemption_period);
5291 detect_input_pending_ignore_squeezables (); 5299 if (detect_input_pending_ignore_squeezables ())
5300 break;
5292 } 5301 }
5293 } 5302 }
5294#else 5303#else