+2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
+
2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
* lread.c (init_obarray): Declare Qt and Qnil as special.
SELECT_TYPE all_rfds, all_wfds;
EMACS_TIME tmo, *tmop = timeout;
- GMainContext *context = g_main_context_default ();
+ GMainContext *context;
int have_wfds = wfds != NULL;
int n_gfds = 0, our_tmo = 0, retval = 0, our_fds = 0;
int i, nfds, fds_lim, tmo_in_millisec;
+ if (inhibit_window_system || !display_arg)
+ return select (max_fds, rfds, wfds, efds, timeout);
+
if (rfds) memcpy (&all_rfds, rfds, sizeof (all_rfds));
else FD_ZERO (&all_rfds);
if (wfds) memcpy (&all_wfds, wfds, sizeof (all_rfds));
else FD_ZERO (&all_wfds);
/* Update event sources in GLib. */
+ context = g_main_context_default ();
g_main_context_pending (context);
do {