aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix/main.c
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-04-10 16:20:51 +0200
committerMihai Moldovan <ionic@ionic.de>2017-04-10 16:20:51 +0200
commitcc24d8ba254f1e5062c21adfa07f8b58bb2c5eaa (patch)
treee22b443672f84f9305e682f2c6c0d0e896b967a6 /nx-X11/programs/Xserver/dix/main.c
parent9e2588e56f5b712c4501a19c1f723257c05aa6af (diff)
parentc4c5485474a03bcfd2632d12c2e6e88ba20be471 (diff)
downloadnx-libs-cc24d8ba254f1e5062c21adfa07f8b58bb2c5eaa.tar.gz
nx-libs-cc24d8ba254f1e5062c21adfa07f8b58bb2c5eaa.tar.bz2
nx-libs-cc24d8ba254f1e5062c21adfa07f8b58bb2c5eaa.zip
Merge branch 'sunweaver-pr/switch-to-libXfont2-API' into 3.6.x
Attributes GH PR #362: https://github.com/ArcticaProject/nx-libs/pull/362
Diffstat (limited to 'nx-X11/programs/Xserver/dix/main.c')
-rw-r--r--nx-X11/programs/Xserver/dix/main.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/nx-X11/programs/Xserver/dix/main.c b/nx-X11/programs/Xserver/dix/main.c
index ab8e41394..3f3c079e4 100644
--- a/nx-X11/programs/Xserver/dix/main.c
+++ b/nx-X11/programs/Xserver/dix/main.c
@@ -95,6 +95,12 @@ Equipment Corporation.
#include "colormapst.h"
#include "cursorstr.h"
#include <X11/fonts/font.h>
+#include <X11/fonts/fontstruct.h>
+#ifdef HAS_XFONT2
+# include <X11/fonts/libxfont2.h>
+#else
+# include <X11/fonts/fontutil.h>
+#endif /* HAS_XFONT2 */
#include "opaque.h"
#include "servermd.h"
#include "site.h"
@@ -252,7 +258,11 @@ main(int argc, char *argv[], char *envp[])
InitAtoms();
InitEvents();
+#ifdef HAS_XFONT2
+ xfont2_init_glyph_caching();
+#else
InitGlyphCaching();
+#endif /* of HAS_XFONT2 */
ResetClientPrivates();
ResetScreenPrivates();
ResetWindowPrivates();
@@ -261,8 +271,8 @@ main(int argc, char *argv[], char *envp[])
ResetPixmapPrivates();
#endif
ResetColormapPrivates();
- ResetFontPrivateIndex();
ResetDevicePrivateIndex();
+ InitFonts();
InitCallbackManager();
InitVisualWrap();
InitOutput(&screenInfo, argc, argv);
@@ -294,9 +304,8 @@ main(int argc, char *argv[], char *envp[])
FatalError("failed to initialize core devices");
ReserveClientIds(serverClient);
- InitFonts();
if (loadableFonts) {
- SetFontPath(0, 0, (unsigned char *)defaultFontPath, &error);
+ SetFontPath(serverClient, 0, (unsigned char *)defaultFontPath);
} else {
if (SetDefaultFontPath(defaultFontPath) != Success)
ErrorF("failed to set default font path '%s'\n",