diff options
author | Ken Brown <kbrown@cornell.edu> | 2012-05-19 17:46:43 -0400 |
---|---|---|
committer | Ken Brown <kbrown@cornell.edu> | 2012-05-19 17:46:43 -0400 |
commit | b2f4d39feba297c55c0547d933c018267d9157f8 (patch) | |
tree | 88ecefeb1949d396610db3c36b0d5e0a0fbd1631 /src/xgselect.c | |
parent | 567739fbcb3d46656f7fc4397e89f17334d52cdc (diff) | |
download | emacs-b2f4d39feba297c55c0547d933c018267d9157f8.tar.gz |
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'.
Diffstat (limited to 'src/xgselect.c')
-rw-r--r-- | src/xgselect.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xgselect.c b/src/xgselect.c index 8b5ee68e55b..69ad93b3127 100644 --- a/src/xgselect.c +++ b/src/xgselect.c @@ -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)); |