From c818610cb290773db486f0937739b19581077bf8 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 19 Jan 2011 14:47:48 +0000 Subject: Use .Xdefaults file in current dir --- libX11/src/GetDflt.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libX11/src/GetDflt.c b/libX11/src/GetDflt.c index dfda1c64d..0443e2d1a 100644 --- a/libX11/src/GetDflt.c +++ b/libX11/src/GetDflt.c @@ -160,9 +160,13 @@ InitDefaults( * ~/.Xdefaults. Next, if there is an XENVIRONMENT environment variable, * then load that file. */ - + if (dpy->xdefaults == NULL) { + #ifdef _MSC_VER + const char *slashDotXdefaults = ".Xdefaults"; + #else const char *slashDotXdefaults = "/.Xdefaults"; + #endif (void) GetHomeDir (fname, PATH_MAX - strlen (slashDotXdefaults) - 1); (void) strcat (fname, slashDotXdefaults); @@ -172,7 +176,11 @@ InitDefaults( } if (!(xenv = getenv ("XENVIRONMENT"))) { + #ifdef _MSC_VER + const char *slashDotXdefaultsDash = ".Xdefaults-"; + #else const char *slashDotXdefaultsDash = "/.Xdefaults-"; + #endif int len; (void) GetHomeDir (fname, PATH_MAX - strlen (slashDotXdefaultsDash) - 1); -- cgit v1.2.3