aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix')
-rw-r--r--xorg-server/dix/main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c
index 24aa7b6c0..fa65a4051 100644
--- a/xorg-server/dix/main.c
+++ b/xorg-server/dix/main.c
@@ -159,6 +159,20 @@ int main(int argc, char *argv[], char *envp[])
XInitThreads has to be called before
any xlib function is called (aoccording to the man page) */
XInitThreads();
+ /* change the current directory to the directory where the vcxsrv.exe executable is installed.
+ This is needed because the font directories are relative to the current directory.
+ */
+ {
+ char ModuleFilename[MAX_PATH];
+ char *pSlash;
+ GetModuleFileName(NULL,ModuleFilename,sizeof(ModuleFilename));
+ pSlash=strrchr(ModuleFilename,'\\');
+ if (pSlash)
+ {
+ *pSlash='\0';
+ chdir(ModuleFilename);
+ }
+ }
#endif
InitRegions();