# HG changeset patch # User Richard M. Stallman # Date 1033321456 0 # Node ID a0360c4a306647fd3ecc875ea39a80fb3db87d28 # Parent 9597eaa105a1a93c5e5318459fb1581e7f769037 (STOP_POLLING, RESUME_POLLING): New macros. (redisplay_internal): Use them. Do RESUME_POLLING at end of function. diff -r 9597eaa105a1 -r a0360c4a3066 src/xdisp.c --- a/src/xdisp.c Sun Sep 29 16:22:19 2002 +0000 +++ b/src/xdisp.c Sun Sep 29 17:44:16 2002 +0000 @@ -8471,6 +8471,14 @@ b->clip_changed = 1; } } + +#define STOP_POLLING \ +do { if (! polling_stopped_here) stop_polling (); \ + polling_stopped_here = 1; } while (0) + +#define RESUME_POLLING \ +do { if (polling_stopped_here) start_polling (); \ + polling_stopped_here = 0; } while (0) /* If PRESERVE_ECHO_AREA is nonzero, it means this redisplay is not in @@ -8491,6 +8499,7 @@ int number_of_visible_frames; int count; struct frame *sf = SELECTED_FRAME (); + int polling_stopped_here = 0; /* Non-zero means redisplay has to consider all windows on all frames. Zero means, only selected_window is considered. */ @@ -8979,7 +8988,7 @@ error. */ if (interrupt_input) unrequest_sigio (); - stop_polling (); + STOP_POLLING; /* Update the display. */ set_window_update_flags (XWINDOW (f->root_window), 1); @@ -9035,7 +9044,7 @@ which can cause an apparent I/O error. */ if (interrupt_input) unrequest_sigio (); - stop_polling (); + STOP_POLLING; if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf)) { @@ -9111,7 +9120,7 @@ But it is much hairier to try to do anything about that. */ if (interrupt_input) request_sigio (); - start_polling (); + RESUME_POLLING; /* If a frame has become visible which was not before, redisplay again, so that we display it. Expose events for such a frame @@ -9152,6 +9161,7 @@ end_of_redisplay: unbind_to (count, Qnil); + RESUME_POLLING; }