[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115478: * xterm.c (x_make_frame_visible): Restore h
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] trunk r115478: * xterm.c (x_make_frame_visible): Restore hack which is needed when |
Date: |
Thu, 12 Dec 2013 04:04:58 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115478
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Thu 2013-12-12 08:04:35 +0400
message:
* 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.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/keyboard.c keyboard.c-20091113204419-o5vbwnq5f7feedwu-449
src/xterm.c xterm.c-20091113204419-o5vbwnq5f7feedwu-244
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-12-11 16:52:34 +0000
+++ b/src/ChangeLog 2013-12-12 04:04:35 +0000
@@ -1,3 +1,11 @@
+2013-12-12 Dmitry Antipov <address@hidden>
+
+ * 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 <address@hidden>
* dispextern.h (erase_phys_cursor):
=== modified file 'src/keyboard.c'
--- a/src/keyboard.c 2013-12-07 23:04:10 +0000
+++ b/src/keyboard.c 2013-12-12 04:04:35 +0000
@@ -1954,7 +1954,6 @@
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 @@
&& !waiting_for_input)
gobble_input ();
}
-#endif
/* Timer callback function for poll_timer. TIMER is equal to
poll_timer. */
@@ -2015,8 +2013,6 @@
#endif
}
-#ifdef HAVE_NTGUI
-
/* True if we are using polling to handle input asynchronously. */
bool
@@ -2031,7 +2027,6 @@
return 0;
#endif
}
-#endif
/* Turn off polling. */
=== modified file 'src/xterm.c'
--- a/src/xterm.c 2013-12-11 15:06:04 +0000
+++ b/src/xterm.c 2013-12-12 04:04:35 +0000
@@ -8923,6 +8923,27 @@
{
/* 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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115478: * xterm.c (x_make_frame_visible): Restore hack which is needed when,
Dmitry Antipov <=