From 3db805979b476d233baa881e83950ef1d2731841 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 15 Jul 2008 16:56:12 -0700 Subject: Apple: Allow Xquartz to provide an additional fd to xtrans since the dynamic addition code in the server isn't bulletproof yet. --- Xtrans.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Xtrans.c') diff --git a/Xtrans.c b/Xtrans.c index b6b3224..f6576e9 100644 --- a/Xtrans.c +++ b/Xtrans.c @@ -1052,6 +1052,9 @@ complete_network_count (void) } +#ifdef XQUARTZ_EXPORTS_LAUNCHD_FD +extern int xquartz_launchd_fd; +#endif int TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret, @@ -1070,6 +1073,17 @@ TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret, *count_ret = 0; +#ifdef XQUARTZ_EXPORTS_LAUNCHD_FD + fprintf(stderr, "Launchd socket fd: %d\n", xquartz_launchd_fd); + if(xquartz_launchd_fd != -1) { + if((ciptr = TRANS(ReopenCOTSServer(TRANS_SOCKET_LOCAL_INDEX, + xquartz_launchd_fd, getenv("DISPLAY"))))==NULL) + fprintf(stderr,"Got NULL while trying to Reopen launchd port\n"); + else + temp_ciptrs[(*count_ret)++] = ciptr; + } +#endif + for (i = 0; i < NUMTRANS; i++) { Xtransport *trans = Xtransports[i].transport; -- cgit v1.2.1