rem: if (wScreenCount == 1) return;  tmp = wmalloc(strlen(DisplayName)+64); sprintf(tmp, "DISPLAY=%s", XDisplayName(DisplayName)); ptr = strchr(strchr(DisplayName, ':'), '.'); if (ptr) *ptr = 0; sprintf(buf, ".%i", scr->screen); strcat(tmp, buf);
add: if (wScreenCount > 1) { tmp = wmalloc(strlen(DisplayName)+64); sprintf(tmp, "DISPLAY=%s", XDisplayName(DisplayName)); ptr = strchr(strchr(tmp, ':'), '.'); if (ptr) *ptr = 0; sprintf(buf, ".%i", scr->screen); strcat(tmp, buf); putenv(tmp); } tmp = wmalloc(60); sprintf(tmp, "WRASTER_COLOR_RESOLUTION%i=%i", scr->screen, scr->rcontext->attribs->colors_per_channel);
context: SetupEnvironment(WScreen *scr){    char *tmp, *ptr;    char buf[16];    if (wScreenCount == 1)	return;    tmp = wmalloc(strlen(DisplayName)+64);    sprintf(tmp, "DISPLAY=%s", XDisplayName(DisplayName));    ptr = strchr(strchr(DisplayName, ':'), '.');    if (ptr)	*ptr = 0;    sprintf(buf, ".%i", scr->screen);    strcat(tmp, buf);    putenv(tmp);}