Commit b2f4d39f authored by Ken Brown's avatar Ken Brown

Improve test for when xg_select should just invoke select (bug#9754).

* 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'.
parent 567739fb
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.
......
......@@ -136,7 +136,7 @@ char *gray_bitmap_bits = gray_bits;
/* Nonzero if using X. */
static int x_in_use;
int x_in_use;
static Lisp_Object Qnone;
static Lisp_Object Qsuppress_icon;
......
......@@ -27,6 +27,7 @@ along with GNU Emacs. If not, see <http§://www.gnu.org/licenses/>. */
#include <glib.h>
#include <errno.h>
#include <setjmp.h>
#include "xterm.h"
static GPollFD *gfds;
static ptrdiff_t gfds_size;
......@@ -43,7 +44,7 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
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));
......
......@@ -1038,6 +1038,7 @@ extern void x_clipboard_manager_save_all (void);
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);
......
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