diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-11-25 01:30:03 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-11-25 11:53:06 -0800 |
commit | 94df1ab7f09a64f57c1e1453e3640462e984619c (patch) | |
tree | 07bcc4097f329118d69b4ecc47d1fbc1f94164c3 /hw/xquartz/pbproxy | |
parent | 0b314c50a2a0ca1afbdc06663c3b719b05ebb851 (diff) |
XQuartz: Force X11Controller to reset a broken DISPLAY envvar.
(cherry picked from commit f1a52b5b5ac31702497937efe3ac578be9a6c54f)
Diffstat (limited to 'hw/xquartz/pbproxy')
-rw-r--r-- | hw/xquartz/pbproxy/main.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/xquartz/pbproxy/main.m b/hw/xquartz/pbproxy/main.m index 17720abeb..247ff7475 100644 --- a/hw/xquartz/pbproxy/main.m +++ b/hw/xquartz/pbproxy/main.m @@ -76,9 +76,9 @@ BOOL xpbproxy_init (void) { xpbproxy_dpy = XOpenDisplay(NULL); if(!xpbproxy_dpy && display) { - char *_display = alloca(sizeof(char) * (strlen(display) + 2)); - strcpy(_display+1, display); - *_display=':'; + char _display[32]; + snprintf(_display, sizeof(_display), ":%s", display); + setenv("DISPLAY", _display, TRUE); xpbproxy_dpy=XOpenDisplay(_display); } |