aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winprefs.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winprefs.c')
-rw-r--r--xorg-server/hw/xwin/winprefs.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c
index c3b194560..4d34e41a1 100644
--- a/xorg-server/hw/xwin/winprefs.c
+++ b/xorg-server/hw/xwin/winprefs.c
@@ -56,6 +56,8 @@ extern DWORD g_dwCurrentThreadID;
extern const char *winGetBaseDir(void);
+extern const char *g_pszLogFile;
+
/* From winmultiwindowflex.l, the real parser */
extern void parse_file (FILE *fp);
@@ -387,8 +389,8 @@ HandleCustomWM_COMMAND (unsigned long hwndIn,
memset (&start, 0, sizeof (start));
start.cb = sizeof (start);
- start.dwFlags = STARTF_USESHOWWINDOW;
- start.wShowWindow = SW_HIDE;
+ //start.dwFlags = STARTF_USESHOWWINDOW;
+ //start.wShowWindow = SW_HIDE;
memset (&child, 0, sizeof (child));
@@ -399,7 +401,7 @@ HandleCustomWM_COMMAND (unsigned long hwndIn,
CloseHandle (child.hProcess);
}
else
- MessageBox(NULL, m->menuItem[j].param, "Mingrc Exec Command Error!", MB_OK | MB_ICONEXCLAMATION);
+ MessageBox(NULL, m->menuItem[j].param, "VcXsrv Exec Command Error!", MB_OK | MB_ICONEXCLAMATION);
}
return TRUE;
#endif
@@ -751,7 +753,9 @@ LoadPreferences (void)
prefFile = fopen (fname, "r");
if (prefFile)
- ErrorF ("winPrefsLoadPreferences: %s\n", fname);
+ {
+ winDebug ("winPrefsLoadPreferences: %s\n", fname);
+ }
}
/* No home file found, check system default */
@@ -766,7 +770,9 @@ LoadPreferences (void)
buffer[sizeof(buffer)-1] = 0;
prefFile = fopen (buffer, "r");
if (prefFile)
- ErrorF ("winPrefsLoadPreferences: %s\n", buffer);
+ {
+ winDebug ("winPrefsLoadPreferences: %s\n", buffer);
+ }
}
/* If we could open it, then read the settings and close it */
@@ -777,17 +783,13 @@ 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));
- if (szEnvDisplay)
- {
- strcpy (szEnvDisplay, szDisplay);
- putenv (szEnvDisplay);
- }
+ /* because putenv doesn't copy the argument... Always use screen 0 */
+ winGetDisplayName(szDisplay, 0);
+ szEnvDisplay = (char *)(malloc(strlen(szDisplay)+9/*strlen("DISPLAY=")+1*/));
+ 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++)
@@ -803,6 +805,12 @@ LoadPreferences (void)
dstParam += strlen(szDisplay);
srcParam += 9;
}
+ else if (!strncmp(srcParam, "%logfile%", 9))
+ {
+ memcpy (dstParam, g_pszLogFile, strlen(g_pszLogFile));
+ dstParam += strlen(g_pszLogFile);
+ srcParam += 9;
+ }
else
{
*dstParam = *srcParam;