aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2013-06-08 10:48:52 +0200
committerJan Djärv2013-06-08 10:48:52 +0200
commit5de0e0116411d36673ee3eeeb1d207f25c0d4b95 (patch)
treec5405d75bf4e5816d8532b2cb4c9e482addb9f89 /src
parent1a312bf403efdbc6b5fc3b9c9368b97ca500dc9d (diff)
downloademacs-5de0e0116411d36673ee3eeeb1d207f25c0d4b95.tar.gz
emacs-5de0e0116411d36673ee3eeeb1d207f25c0d4b95.zip
* xgselect.c (xg_select): Remove call to window_system_available
and g_main_context_pending at the top, so Gdk events (i.e. file notify) are processed when Emacs is started with -nw.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xgselect.c10
2 files changed, 13 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 646f1d43f43..7d650885f19 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12013-06-08 Jan Djärv <jan.h.d@swipnet.se>
2
3 * xgselect.c (xg_select): Remove call to window_system_available
4 and g_main_context_pending at the top, so Gdk events (i.e. file
5 notify) are processed when Emacs is started with -nw.
6
12013-06-07 Eli Zaretskii <eliz@gnu.org> 72013-06-07 Eli Zaretskii <eliz@gnu.org>
2 8
3 * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files. 9 * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
diff --git a/src/xgselect.c b/src/xgselect.c
index 38b9705e976..e2d14f12e9f 100644
--- a/src/xgselect.c
+++ b/src/xgselect.c
@@ -44,9 +44,13 @@ xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
44 int i, nfds, tmo_in_millisec; 44 int i, nfds, tmo_in_millisec;
45 USE_SAFE_ALLOCA; 45 USE_SAFE_ALLOCA;
46 46
47 if (! (window_system_available (NULL) 47 /* Do not try to optimize with an initial check with g_main_context_pending
48 && g_main_context_pending (context = g_main_context_default ()))) 48 and a call to pselect if it returns false. If Gdk has a timeout for 0.01
49 return pselect (fds_lim, rfds, wfds, efds, timeout, sigmask); 49 second, and Emacs has a timeout for 1 second, g_main_context_pending will
50 return false, but the timeout will be 1 second, thus missing the gdk
51 timeout with a lot. */
52
53 context = g_main_context_default ();
50 54
51 if (rfds) all_rfds = *rfds; 55 if (rfds) all_rfds = *rfds;
52 else FD_ZERO (&all_rfds); 56 else FD_ZERO (&all_rfds);