diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2010-04-23 16:33:44 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2010-04-23 17:19:01 -0700 |
commit | adcd0ec209abf832a769d52db660fb37eaad6e0c (patch) | |
tree | 4106e7141212281ef2cdd1906294a7b8a5d05a05 /src | |
parent | d232b259c36fdde1f4179822809fec1480867dc5 (diff) | |
download | xorg-lib-libX11-adcd0ec209abf832a769d52db660fb37eaad6e0c.tar.gz |
Remove launchd logic from _XConnectXCB as it's handled in XCB
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/xcb_disp.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/src/xcb_disp.c b/src/xcb_disp.c index 2625966d..fe1bdbfd 100644 --- a/src/xcb_disp.c +++ b/src/xcb_disp.c @@ -63,28 +63,19 @@ int _XConnectXCB(Display *dpy, _Xconst char *display, char **fullnamep, int *scr if(!dpy->xcb) return 0; -#ifdef HAVE_LAUNCHD - if(!display || !*display) display = getenv("DISPLAY"); - - if(display && strlen(display)>11 && !strncmp(display, "/tmp/launch", 11)) { - /* do nothing -- the magic happens inside of xcb_connect */ - } else -#endif - { - if(!xcb_parse_display(display, &host, &n, screenp)) - return 0; - - len = strlen(host) + (1 + 20 + 1 + 20 + 1); - *fullnamep = Xmalloc(len); - if (!*fullnamep) { - free(host); - return 0; - } + if(!xcb_parse_display(display, &host, &n, screenp)) + return 0; - snprintf(*fullnamep, len, "%s:%d.%d", host, n, *screenp); + len = strlen(host) + (1 + 20 + 1 + 20 + 1); + *fullnamep = Xmalloc(len); + if (!*fullnamep) { free(host); + return 0; } + snprintf(*fullnamep, len, "%s:%d.%d", host, n, *screenp); + free(host); + _XLockMutex(_Xglobal_lock); if(xauth.name && xauth.data) c = xcb_connect_to_display_with_auth_info(display, &xauth, NULL); |