Set DISPLAY env var early. Fixes a problem with multihead and early alerts.

SVN revision: 9540
This commit is contained in:
Kim Woelders 2004-03-31 19:05:55 +00:00
parent 5ec575476b
commit c14d95608a
1 changed files with 3 additions and 2 deletions

View File

@ -181,6 +181,7 @@ SetupX()
Esnprintf(subdisplay + strlen(subdisplay), 10, ".%d", i);
dstr = Estrdup(subdisplay);
disp = XOpenDisplay(dstr);
root.scr = i;
/* Terminate the loop as I am the child process... */
break;
@ -189,6 +190,8 @@ SetupX()
}
}
Esetenv("DISPLAY", DisplayString(disp), 1);
/* set up an error handler for then E would normally have fatal X errors */
XSetErrorHandler((XErrorHandler) EHandleXError);
/* set up a handler for when the X Connection goes down */
@ -546,8 +549,6 @@ SetupEnv()
{
char s[1024];
if (master_pid != getpid())
Esetenv("DISPLAY", DisplayString(disp), 1);
Esetenv("EVERSION", ENLIGHTENMENT_VERSION, 1);
Esetenv("EROOT", EDirRoot(), 1);
Esetenv("EBIN", EDirBin(), 1);