Subject: Re: bug#12450: Remove configure's --without-sync-input option.

From: Eli Zaretskii <[email-masked]>
Date: Sat, 22 Sep 2012 12:03:50 +0300

> Date: Fri, 21 Sep 2012 13:50:45 -0700
> From: Paul Eggert <[email-masked]>
> CC: [email-masked]
> 
> On 09/17/2012 12:42 AM, Eli Zaretskii wrote:
> 
> > There are still a lot of comments in the code that describe the
> > non-SYNC_INPUT mode.  For example, see blockinput.h.
> 
> Thanks, I've fixed up the blockinput.h comments in the proposed patch
> for Bug#12471; please see <http://bugs.gnu.org/12471#20>.  Any other
> comments need fixing, please feel free to let me know.

Here are a few suspects:

termopts.h:

  /* Nonzero means use interrupt-driven input.  */
  extern int interrupt_input;

  /* Nonzero while interrupts are temporarily deferred during redisplay.  */
  extern int interrupts_deferred;

xdisp.c:

              /* Redisplay that happens asynchronously due to an expose event
                 may access f->tool_bar_items.  Make sure we update both
                 variables within BLOCK_INPUT so no such event interrupts.  */

  /* Redraw the part of window W intersection rectangle FR.  Pixel
     coordinates in FR are frame-relative.  Call this function with
     input blocked.  Value is non-zero if the exposure overwrites
     mouse-face.  */

   This function may only use code that doesn't eval because it is
   called asynchronously from note_mouse_highlight.  */

  /* This function can be called asynchronously, which means we must
     exclude any possibility that Fget_text_property signals an
     error.  */

   This is an ugly monster macro construct because we must use alloca
   to allocate glyph strings (because draw_glyphs can be called
   asynchronously).  */

		  /* Prevent various kinds of signals during display
		     update.  stdio is not robust about handling
		     signals, which can cause an apparent I/O
		     error.  */

dispnew.c:

         On the other hand, we need notice_overwritten_cursor as long
         as mouse highlighting is done asynchronously outside of
         redisplay.  */

   If DELAY, assume we're being called from a signal handler, and
   queue the change for later - perhaps the next redisplay.
   Since this tries to resize windows, we can't call it
   from a signal handler.