aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/dispatch.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-09 21:30:23 +0000
committermarha <marha@users.sourceforge.net>2010-05-09 21:30:23 +0000
commit4b4ee0dc63abddffdc64355429e4ea9ccaa4d36d (patch)
treecb7a7ad6de86b9270b41397fe04115fc84088127 /xorg-server/dix/dispatch.c
parent118898c84d3dfea814d7f58a08cd4ee4d8123731 (diff)
downloadvcxsrv-4b4ee0dc63abddffdc64355429e4ea9ccaa4d36d.tar.gz
vcxsrv-4b4ee0dc63abddffdc64355429e4ea9ccaa4d36d.tar.bz2
vcxsrv-4b4ee0dc63abddffdc64355429e4ea9ccaa4d36d.zip
svn merge -r577:HEAD ^/branches/released .
Diffstat (limited to 'xorg-server/dix/dispatch.c')
-rw-r--r--xorg-server/dix/dispatch.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c
index b813136c7..3e5a7ac74 100644
--- a/xorg-server/dix/dispatch.c
+++ b/xorg-server/dix/dispatch.c
@@ -1324,22 +1324,13 @@ ProcQueryFont(ClientPtr client)
{
xQueryFontReply *reply;
FontPtr pFont;
- GC *pGC;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
- client->errorValue = stuff->id; /* EITHER font or gc */
- rc = dixLookupResourceByType((pointer *)&pFont, stuff->id, RT_FONT, client,
- DixGetAttrAccess);
- if (rc == BadValue) {
- rc = dixLookupResourceByType((pointer *)&pGC, stuff->id, RT_GC, client,
- DixGetAttrAccess);
- if (rc == Success)
- pFont = pGC->font;
- }
+ rc = dixLookupFontable(&pFont, stuff->id, client, DixGetAttrAccess);
if (rc != Success)
- return (rc == BadValue) ? BadFont: rc;
+ return rc;
{
xCharInfo *pmax = FONTINKMAX(pFont);
@@ -1380,24 +1371,15 @@ ProcQueryTextExtents(ClientPtr client)
{
xQueryTextExtentsReply reply;
FontPtr pFont;
- GC *pGC;
ExtentInfoRec info;
unsigned long length;
int rc;
REQUEST(xQueryTextExtentsReq);
REQUEST_AT_LEAST_SIZE(xQueryTextExtentsReq);
- client->errorValue = stuff->fid; /* EITHER font or gc */
- rc = dixLookupResourceByType((pointer *)&pFont, stuff->fid, RT_FONT, client,
- DixGetAttrAccess);
- if (rc == BadValue) {
- rc = dixLookupResourceByType((pointer *)&pGC, stuff->fid, RT_GC, client,
- DixGetAttrAccess);
- if (rc == Success)
- pFont = pGC->font;
- }
+ rc = dixLookupFontable(&pFont, stuff->fid, client, DixGetAttrAccess);
if (rc != Success)
- return (rc == BadValue) ? BadFont: rc;
+ return rc;
length = client->req_len - bytes_to_int32(sizeof(xQueryTextExtentsReq));
length = length << 1;