Commit 96542302 authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

* xterm.c (x_make_frame_visible): Restore hack which is needed when

input polling is used.  This is still meaningful for Cygwin, see
http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
* keyboard.c (poll_for_input_1, input_polling_used): Define
unconditionally.
parent f54de22e
2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
* xterm.c (x_make_frame_visible): Restore hack which is needed when
input polling is used. This is still meaningful for Cygwin, see
http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
* keyboard.c (poll_for_input_1, input_polling_used): Define
unconditionally.
2013-12-11 Ken Brown <kbrown@cornell.edu>
* dispextern.h (erase_phys_cursor):
......
......@@ -1954,7 +1954,6 @@ int poll_suppress_count;
static struct atimer *poll_timer;
#ifdef HAVE_NTGUI
/* Poll for input, so that we catch a C-g if it comes in. */
void
poll_for_input_1 (void)
......@@ -1963,7 +1962,6 @@ poll_for_input_1 (void)
&& !waiting_for_input)
gobble_input ();
}
#endif
/* Timer callback function for poll_timer. TIMER is equal to
poll_timer. */
......@@ -2015,8 +2013,6 @@ start_polling (void)
#endif
}
#ifdef HAVE_NTGUI
/* True if we are using polling to handle input asynchronously. */
bool
......@@ -2031,7 +2027,6 @@ input_polling_used (void)
return 0;
#endif
}
#endif
/* Turn off polling. */
......
......@@ -8923,6 +8923,27 @@ x_make_frame_visible (struct frame *f)
{
/* Force processing of queued events. */
x_sync (f);
/* This hack is still in use at least for Cygwin. See
http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
Machines that do polling rather than SIGIO have been
observed to go into a busy-wait here. So we'll fake an
alarm signal to let the handler know that there's something
to be read. We used to raise a real alarm, but it seems
that the handler isn't always enabled here. This is
probably a bug. */
if (input_polling_used ())
{
/* It could be confusing if a real alarm arrives while
processing the fake one. Turn it off and let the
handler reset it. */
int old_poll_suppress_count = poll_suppress_count;
poll_suppress_count = 1;
poll_for_input_1 ();
poll_suppress_count = old_poll_suppress_count;
}
if (XPending (FRAME_X_DISPLAY (f)))
{
XEvent xev;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment