aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix/dispatch.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/dispatch.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/dispatch.c')
-rw-r--r--nx-X11/programs/Xserver/dix/dispatch.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c
index 8294a583a..51468f1c7 100644
--- a/nx-X11/programs/Xserver/dix/dispatch.c
+++ b/nx-X11/programs/Xserver/dix/dispatch.c
@@ -86,6 +86,11 @@ int ProcInitialConnection();
#include "windowstr.h"
#include <X11/fonts/fontstruct.h>
+#ifdef HAS_XFONT2
+# include <X11/fonts/libxfont2.h>
+#else
+# include <X11/fonts/fontutil.h>
+#endif /* HAS_XFONT2 */
#include "dixfontstr.h"
#include "gcstruct.h"
#include "selection.h"
@@ -1399,7 +1404,11 @@ ProcQueryTextExtents(register ClientPtr client)
return(BadLength);
length--;
}
+#ifdef HAS_XFONT2
+ if (!xfont2_query_text_extents(pFont, length, (unsigned char *)&stuff[1], &info))
+#else
if (!QueryTextExtents(pFont, length, (unsigned char *)&stuff[1], &info))
+#endif /* HAS_XFONT2 */
return(BadAlloc);
reply.type = X_Reply;
reply.length = 0;
@@ -3364,7 +3373,6 @@ ProcSetFontPath(register ClientPtr client)
unsigned long nbytes, total;
long nfonts;
int n, result;
- int error;
REQUEST(xSetFontPathReq);
REQUEST_AT_LEAST_SIZE(xSetFontPathReq);
@@ -3382,13 +3390,9 @@ ProcSetFontPath(register ClientPtr client)
}
if (total >= 4)
return(BadLength);
- result = SetFontPath(client, stuff->nFonts, (unsigned char *)&stuff[1],
- &error);
+ result = SetFontPath(client, stuff->nFonts, (unsigned char *)&stuff[1]);
if (!result)
- {
result = client->noClientException;
- client->errorValue = error;
- }
return (result);
}