From 438af0c7d4bf60b408b259c88205ff2193195466 Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 21 Sep 2014 18:11:28 +0200 Subject: libxtrans xkeyboard-config xserver mesa plink glproto git update 21 Sep 2014 plink revision 10233 xserver commit 28337cb14e4347e1dd7936c5393a22e042866687 xkeyboard-config commit 48e1c0b351b6711edc0f167cbb81e4424b75291a glproto commit bd3d751e1eb17efb39f65093271bb4ac071aa9e0 libxtrans commit fb7f198c88e97d22c8c89e76e9cd06b2b2720a96 mesa commit 4eb2bbefd2bf0359aff7ebbb8e931a1c7833606f --- xorg-server/hw/xwin/winprefs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xorg-server/hw/xwin/winprefs.c') diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c index f386facdd..53abc163f 100644 --- a/xorg-server/hw/xwin/winprefs.c +++ b/xorg-server/hw/xwin/winprefs.c @@ -44,6 +44,7 @@ #include #include "winprefs.h" +#include "windisplay.h" #include "winmultiwindowclass.h" /* Where will the custom menu commands start counting from? */ @@ -712,15 +713,14 @@ LoadPreferences(void) /* Setup a DISPLAY environment variable, need to allocate on heap */ /* because putenv doesn't copy the argument... */ - snprintf(szDisplay, 512, "DISPLAY=127.0.0.1:%s.0", display); - szEnvDisplay = (char *) (malloc(strlen(szDisplay) + 1)); + winGetDisplayName(szDisplay, 0); + szEnvDisplay = (char *) (malloc(strlen(szDisplay) + strlen("DISPLAY=") + 1)); if (szEnvDisplay) { - strcpy(szEnvDisplay, szDisplay); + snprintf(szEnvDisplay, 512, "DISPLAY=%s", szDisplay); putenv(szEnvDisplay); } /* Replace any "%display%" in menu commands with display string */ - snprintf(szDisplay, 512, "127.0.0.1:%s.0", display); for (i = 0; i < pref.menuItems; i++) { for (j = 0; j < pref.menu[i].menuItems; j++) { if (pref.menu[i].menuItem[j].cmd == CMD_EXEC) { -- cgit v1.2.3