From 9cd4b45217e5624c4ffa1ad77aff87ea280db45a Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 20 Feb 2010 17:27:12 +0000 Subject: Added command to open log file --- xorg-server/hw/xwin/winprefs.c | 17 +++++++++++------ xorg-server/system.XWinrc | 15 +++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) (limited to 'xorg-server') diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c index 2472ea5aa..3becb436a 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); @@ -785,12 +787,9 @@ LoadPreferences (void) /* Setup a DISPLAY environment variable, need to allocate on heap */ /* because putenv doesn't copy the argument... Always use screen 0 */ winGetDisplayName(szDisplay, 0); - szEnvDisplay = (char *)(malloc(strlen(szDisplay)+strlen("DISPLAY=")+1)); - if (szEnvDisplay) - { - snprintf(szEnvDisplay, 512, "DISPLAY=%s", szDisplay); - putenv (szEnvDisplay); - } + 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 */ for (i=0; i.0) +# (This should only rarely be needed as +# the DISPLAY environment variable is also +# set correctly) # or MENU # or ALWAYSONTOP # ^^ Sets the window to display above all others @@ -79,15 +80,17 @@ // Make some menus... menu apps { - xcalc exec "xcalc" - xclock exec "xclock" - xwininfo exec "xwininfo -pause" + xcalc exec "xcalc" + xclock exec "xclock" + xwininfo exec "xwininfo -pause" } menu root { // Comments fit here, too... "Reload system.XWinrc" RELOAD - "Applications" menu apps + "Applications" menu apps + Separator + "Show log" exec "notepad %logfile%" Separator } -- cgit v1.2.3