aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-19 14:45:41 +0000
committermarha <marha@users.sourceforge.net>2011-01-19 14:45:41 +0000
commitfa1a23f12b982c97f2424a5d2cd6db556e021b9c (patch)
tree90571f38ee9ff378881c07fab24ff9c6efbdf4d1
parent55ad24f775c07bed7ef653d4ead279c8b61fbf20 (diff)
downloadvcxsrv-fa1a23f12b982c97f2424a5d2cd6db556e021b9c.tar.gz
vcxsrv-fa1a23f12b982c97f2424a5d2cd6db556e021b9c.tar.bz2
vcxsrv-fa1a23f12b982c97f2424a5d2cd6db556e021b9c.zip
Use .Xdefaults file in current directory
-rw-r--r--libXt/src/Initialize.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libXt/src/Initialize.c b/libXt/src/Initialize.c
index 1e5e261fb..21ae9f695 100644
--- a/libXt/src/Initialize.c
+++ b/libXt/src/Initialize.c
@@ -428,6 +428,9 @@ static void CombineUserDefaults(
Display *dpy,
XrmDatabase *pdb)
{
+#ifdef _MSC_VER
+ char *slashDotXdefaults = ".Xdefaults";
+#else
#ifdef __MINGW32__
char *slashDotXdefaults = "/Xdefaults";
#else
@@ -439,9 +442,13 @@ static void CombineUserDefaults(
XrmCombineDatabase(XrmGetStringDatabase(dpy_defaults), pdb, False);
} else {
char filename[PATH_MAX];
+#ifndef _MSC_VER
(void) GetRootDirName(filename,
PATH_MAX - strlen (slashDotXdefaults) - 1);
(void) strcat(filename, slashDotXdefaults);
+#else
+ strcpy(filename, slashDotXdefaults);
+#endif
(void)XrmCombineFileDatabase(filename, pdb, False);
}
}