From 7d1c3a76cf92f366549b6588191fd7eb71b9abcc Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 24 Mar 2012 09:32:50 +0100 Subject: [PATCH] Fixes: debbugs:11080 * xterm.c (XTread_socket): Only modify handling_signal if !SYNC_INPUT. --- src/ChangeLog | 5 +++++ src/xterm.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 028b8325aae..11676be8348 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-03-24 Andreas Schwab + + * xterm.c (XTread_socket): Only modify handling_signal if + !SYNC_INPUT. (Bug#11080) + 2012-03-23 Eli Zaretskii * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of diff --git a/src/xterm.c b/src/xterm.c index ddc5db23414..9ce166883c3 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7099,7 +7099,8 @@ x_dispatch_event (XEvent *event, Display *display) /* Read events coming from the X server. - This routine is called by the SIGIO handler. + This routine is called by the SIGIO handler only if SYNC_INPUT is + not defined. We return as soon as there are no more events to be read. We return the number of characters stored into the buffer, @@ -7133,7 +7134,9 @@ XTread_socket (struct terminal *terminal, int expected, struct input_event *hold /* So people can tell when we have read the available input. */ input_signal_count++; +#ifndef SYNC_INPUT ++handling_signal; +#endif /* For debugging, this gives a way to fake an I/O error. */ if (terminal->display_info.x == XTread_socket_fake_io_error) @@ -7223,7 +7226,9 @@ XTread_socket (struct terminal *terminal, int expected, struct input_event *hold pending_autoraise_frame = 0; } +#ifndef SYNC_INPUT --handling_signal; +#endif UNBLOCK_INPUT; return count; -- 2.39.2