diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2010-04-23 21:50:29 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2010-04-23 21:50:29 -0700 |
commit | aae2a4a7aab26de3fa715d6ecd0a0e0926b37fc9 (patch) | |
tree | 96818226386b066eee68fd7b305f655436a63392 | |
parent | adcd0ec209abf832a769d52db660fb37eaad6e0c (diff) |
Don't append the screen number when using a launchd socket
ssh gets confused by this. XQuartz is the only DDX using this
functionality, and it doesn't support different screens, so
let's just not include this until most ssh know how to handle
this.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | src/xcb_disp.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/xcb_disp.c b/src/xcb_disp.c index fe1bdbfd..99e08365 100644 --- a/src/xcb_disp.c +++ b/src/xcb_disp.c @@ -1,6 +1,10 @@ /* Copyright (C) 2003-2006 Jamey Sharp, Josh Triplett * This file is licensed under the MIT license. See the file COPYING. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "Xlibint.h" #include "Xxcbint.h" #include <xcb/xcbext.h> @@ -73,7 +77,12 @@ int _XConnectXCB(Display *dpy, _Xconst char *display, char **fullnamep, int *scr return 0; } - snprintf(*fullnamep, len, "%s:%d.%d", host, n, *screenp); +#ifdef HAVE_LAUNCHD + if(strncmp(host, "/tmp/launch", 11) == 0) + snprintf(*fullnamep, len, "%s:%d", host, n); + else +#endif + snprintf(*fullnamep, len, "%s:%d.%d", host, n, *screenp); free(host); _XLockMutex(_Xglobal_lock); |