summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2009-09-28 23:01:59 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2009-09-28 23:13:20 -0700
commit3218bc7eb53fea677751932fc54a3fe8cf268f24 (patch)
treeb31137e01406a84aeb2f55102f804a239e45b2ed
parent828672ef0d11fa2aba52a2cbb2d3b485ea8a5ee3 (diff)
XQuartz: Remove the redundant xquartz_resetenv_display
unsetenv(DISPLAY) takes care of this for us anyway (cherry picked from commit d2263645d839c9edeedea0835d26f1f41b37f70e)
-rw-r--r--hw/xquartz/X11Controller.m4
-rw-r--r--hw/xquartz/mach-startup/bundle-main.c5
2 files changed, 1 insertions, 8 deletions
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index f84dfccd6..b95414e4d 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -53,8 +53,6 @@
#include <sys/types.h>
#include <sys/wait.h>
-BOOL xquartz_resetenv_display = NO;
-
@implementation X11Controller
- (void) awakeFromNib
@@ -354,7 +352,7 @@ BOOL xquartz_resetenv_display = NO;
newargv[3] = NULL;
s = getenv("DISPLAY");
- if (xquartz_resetenv_display || s == NULL || s[0] == 0) {
+ if (s == NULL || s[0] == 0) {
snprintf(buf, sizeof(buf), ":%s", display);
setenv("DISPLAY", buf, TRUE);
}
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 146ea11d8..691b5555e 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -62,8 +62,6 @@ void DarwinListenOnOpenFD(int fd);
extern int noPanoramiXExtension;
-extern int xquartz_resetenv_display;
-
#define DEFAULT_CLIENT X11BINDIR "/xterm"
#define DEFAULT_STARTX X11BINDIR "/startx"
#define DEFAULT_SHELL "/bin/sh"
@@ -429,9 +427,6 @@ static int startup_trigger(int argc, char **argv, char **envp) {
if((s = getenv("DISPLAY"))) {
fprintf(stderr, "X11.app: Could not connect to server (DISPLAY=\"%s\", unsetting). Starting X server.\n", s);
unsetenv("DISPLAY");
-
- /* This tells X11Controller to not use the environment's DISPLAY and reset it based on the server's display */
- xquartz_resetenv_display = 1;
} else {
fprintf(stderr, "X11.app: Could not connect to server (DISPLAY is not set). Starting X server.\n");
}