summaryrefslogtreecommitdiff
path: root/Xtrans.c
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-07-15 16:56:12 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-07-15 16:56:25 -0700
commit3db805979b476d233baa881e83950ef1d2731841 (patch)
tree883a17987abf70ffa5d0c878ca7303885c7d2f45 /Xtrans.c
parent81d8bdced6b45ab2ab3d3a0bc164ddbf1659fea1 (diff)
Apple: Allow Xquartz to provide an additional fd to xtrans since the dynamic addition code in the server isn't bulletproof yet.
Diffstat (limited to 'Xtrans.c')
-rw-r--r--Xtrans.c14
1 files changed, 14 insertions, 0 deletions
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;