* src/xfns.c (x_in_use): Remove `static' qualifier.
* src/xterm.h (x_in_use): Declare.
* src/xgselect.c: Include xterm.h.
(xg_select): Test `x_in_use' instead of `inhibit_window_system'
and `display_arg'.
+2012-05-19 Ken Brown <kbrown@cornell.edu>
+
+ * xfns.c (x_in_use): Remove `static' qualifier.
+ * xterm.h (x_in_use): Declare.
+ * xgselect.c: Include xterm.h.
+ (xg_select): Test `x_in_use' instead of `inhibit_window_system'
+ and `display_arg' (bug#9754).
+
2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
* s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
/* Nonzero if using X. */
-static int x_in_use;
+int x_in_use;
static Lisp_Object Qnone;
static Lisp_Object Qsuppress_icon;
#include <glib.h>
#include <errno.h>
#include <setjmp.h>
+#include "xterm.h"
static GPollFD *gfds;
static ptrdiff_t gfds_size;
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)
+ if (!x_in_use)
return select (max_fds, rfds, wfds, efds, timeout);
if (rfds) memcpy (&all_rfds, rfds, sizeof (all_rfds));
extern struct x_display_info * check_x_display_info (Lisp_Object);
extern Lisp_Object x_get_focus_frame (struct frame *);
+extern int x_in_use;
#ifdef USE_GTK
extern int xg_set_icon (struct frame *, Lisp_Object);