Fix a bug in uicb_spawn when using IP address in DISPLAY
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
74ab56b1b2
commit
a52832b57d
3
xutil.c
3
xutil.c
|
@ -73,7 +73,8 @@ uicb_spawn(int screen, char *arg)
|
||||||
if(!XineramaIsActive(globalconf.display) && (tmp = getenv("DISPLAY")))
|
if(!XineramaIsActive(globalconf.display) && (tmp = getenv("DISPLAY")))
|
||||||
{
|
{
|
||||||
display = a_strdup(tmp);
|
display = a_strdup(tmp);
|
||||||
if((tmp = strrchr(display, '.')))
|
tmp = strchr(display, ':');
|
||||||
|
if(tmp && (tmp = strrchr(tmp, '.')))
|
||||||
*tmp = '\0';
|
*tmp = '\0';
|
||||||
snprintf(newdisplay, sizeof(newdisplay), "%s.%d", display, screen);
|
snprintf(newdisplay, sizeof(newdisplay), "%s.%d", display, screen);
|
||||||
setenv("DISPLAY", newdisplay, 1);
|
setenv("DISPLAY", newdisplay, 1);
|
||||||
|
|
Loading…
Reference in New Issue