From 97186ab87cf8d21e70c8d3cc7a247add6311abcc Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 12 Jul 2024 12:45:55 +0200 Subject: [PATCH] xfixes: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros Use the new macros to make request struct parsing / field swapping much easier. Signed-off-by: Enrico Weigelt, metux IT consult --- xfixes/cursor.c | 219 +++++++--------------------- xfixes/disconnect.c | 37 +---- xfixes/region.c | 345 +++++++++++--------------------------------- xfixes/saveset.c | 18 +-- xfixes/select.c | 21 +-- xfixes/xfixes.c | 119 +-------------- xfixes/xfixesint.h | 97 ------------- 7 files changed, 156 insertions(+), 700 deletions(-) diff --git a/xfixes/cursor.c b/xfixes/cursor.c index ddd208364c..0ca02ce4f9 100644 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -47,6 +47,7 @@ #endif #include "dix/dix_priv.h" +#include "dix/request_priv.h" #include "xfixesint.h" #include "scrnintstr.h" @@ -265,11 +266,13 @@ XFixesSelectCursorInput(ClientPtr pClient, WindowPtr pWindow, CARD32 eventMask) int ProcXFixesSelectCursorInput(ClientPtr client) { - REQUEST(xXFixesSelectCursorInputReq); + REQUEST_HEAD_STRUCT(xXFixesSelectCursorInputReq); + REQUEST_FIELD_CARD32(window); + REQUEST_FIELD_CARD32(eventMask); + WindowPtr pWin; int rc; - REQUEST_SIZE_MATCH(xXFixesSelectCursorInputReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; @@ -296,18 +299,6 @@ GetBit(unsigned char *line, int x) return 0; } -int _X_COLD -SProcXFixesSelectCursorInput(ClientPtr client) -{ - REQUEST(xXFixesSelectCursorInputReq); - REQUEST_SIZE_MATCH(xXFixesSelectCursorInputReq); - - swaps(&stuff->length); - swapl(&stuff->window); - swapl(&stuff->eventMask); - return ProcXFixesSelectCursorInput(client); -} - void _X_COLD SXFixesCursorNotifyEvent(xXFixesCursorNotifyEvent * from, xXFixesCursorNotifyEvent * to) @@ -363,11 +354,11 @@ CopyCursorToImage(CursorPtr pCursor, CARD32 *image) int ProcXFixesGetCursorImage(ClientPtr client) { -/* REQUEST(xXFixesGetCursorImageReq); */ + REQUEST_HEAD_STRUCT(xXFixesGetCursorImageReq); + CursorPtr pCursor; int npixels, width, height, rc, x, y; - REQUEST_SIZE_MATCH(xXFixesGetCursorImageReq); pCursor = CursorForClient(client); if (!pCursor) return BadCursor; @@ -413,24 +404,18 @@ ProcXFixesGetCursorImage(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesGetCursorImage(ClientPtr client) -{ - REQUEST(xXFixesGetCursorImageReq); - swaps(&stuff->length); - return ProcXFixesGetCursorImage(client); -} - int ProcXFixesSetCursorName(ClientPtr client) { + REQUEST_HEAD_AT_LEAST(xXFixesSetCursorNameReq); + REQUEST_FIELD_CARD32(cursor); + REQUEST_FIELD_CARD16(nbytes); + REQUEST_FIXED_SIZE(xXFixesSetCursorNameReq, stuff->nbytes); + CursorPtr pCursor; char *tchar; - - REQUEST(xXFixesSetCursorNameReq); Atom atom; - REQUEST_FIXED_SIZE(xXFixesSetCursorNameReq, stuff->nbytes); VERIFY_CURSOR(pCursor, stuff->cursor, client, DixSetAttrAccess); tchar = (char *) &stuff[1]; atom = MakeAtom(tchar, stuff->nbytes, TRUE); @@ -441,28 +426,16 @@ ProcXFixesSetCursorName(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesSetCursorName(ClientPtr client) -{ - REQUEST(xXFixesSetCursorNameReq); - - swaps(&stuff->length); - REQUEST_AT_LEAST_SIZE(xXFixesSetCursorNameReq); - swapl(&stuff->cursor); - swaps(&stuff->nbytes); - return ProcXFixesSetCursorName(client); -} - int ProcXFixesGetCursorName(ClientPtr client) { - REQUEST(xXFixesGetCursorNameReq); + REQUEST_HEAD_STRUCT(xXFixesGetCursorNameReq); + REQUEST_FIELD_CARD32(cursor); CursorPtr pCursor; const char *str; int len; - REQUEST_SIZE_MATCH(xXFixesGetCursorNameReq); VERIFY_CURSOR(pCursor, stuff->cursor, client, DixGetAttrAccess); if (pCursor->name) str = NameForAtom(pCursor->name); @@ -489,21 +462,11 @@ ProcXFixesGetCursorName(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesGetCursorName(ClientPtr client) -{ - REQUEST(xXFixesGetCursorNameReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesGetCursorNameReq); - swapl(&stuff->cursor); - return ProcXFixesGetCursorName(client); -} - int ProcXFixesGetCursorImageAndName(ClientPtr client) { -/* REQUEST(xXFixesGetCursorImageAndNameReq); */ + REQUEST_HEAD_STRUCT(xXFixesGetCursorImageAndNameReq); + CursorPtr pCursor; int npixels; const char *name; @@ -511,7 +474,6 @@ ProcXFixesGetCursorImageAndName(ClientPtr client) int width, height; int rc, x, y; - REQUEST_SIZE_MATCH(xXFixesGetCursorImageAndNameReq); pCursor = CursorForClient(client); if (!pCursor) return BadCursor; @@ -567,14 +529,6 @@ ProcXFixesGetCursorImageAndName(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesGetCursorImageAndName(ClientPtr client) -{ - REQUEST(xXFixesGetCursorImageAndNameReq); - swaps(&stuff->length); - return ProcXFixesGetCursorImageAndName(client); -} - /* * Find every cursor reference in the system, ask testCursor * whether it should be replaced with a reference to pCursor. @@ -680,11 +634,12 @@ TestForCursor(CursorPtr pCursor, void *closure) int ProcXFixesChangeCursor(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesChangeCursorReq); + REQUEST_FIELD_CARD32(source); + REQUEST_FIELD_CARD32(destination); + CursorPtr pSource, pDestination; - REQUEST(xXFixesChangeCursorReq); - - REQUEST_SIZE_MATCH(xXFixesChangeCursorReq); VERIFY_CURSOR(pSource, stuff->source, client, DixReadAccess | DixGetAttrAccess); VERIFY_CURSOR(pDestination, stuff->destination, client, @@ -694,18 +649,6 @@ ProcXFixesChangeCursor(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesChangeCursor(ClientPtr client) -{ - REQUEST(xXFixesChangeCursorReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesChangeCursorReq); - swapl(&stuff->source); - swapl(&stuff->destination); - return ProcXFixesChangeCursor(client); -} - static Bool TestForCursorName(CursorPtr pCursor, void *closure) { @@ -717,13 +660,15 @@ TestForCursorName(CursorPtr pCursor, void *closure) int ProcXFixesChangeCursorByName(ClientPtr client) { + REQUEST_HEAD_AT_LEAST(xXFixesChangeCursorByNameReq); + REQUEST_FIELD_CARD32(source); + REQUEST_FIELD_CARD16(nbytes); + REQUEST_FIXED_SIZE(xXFixesChangeCursorByNameReq, stuff->nbytes); + CursorPtr pSource; Atom name; char *tchar; - REQUEST(xXFixesChangeCursorByNameReq); - - REQUEST_FIXED_SIZE(xXFixesChangeCursorByNameReq, stuff->nbytes); VERIFY_CURSOR(pSource, stuff->source, client, DixReadAccess | DixGetAttrAccess); tchar = (char *) &stuff[1]; @@ -733,18 +678,6 @@ ProcXFixesChangeCursorByName(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesChangeCursorByName(ClientPtr client) -{ - REQUEST(xXFixesChangeCursorByNameReq); - - swaps(&stuff->length); - REQUEST_AT_LEAST_SIZE(xXFixesChangeCursorByNameReq); - swapl(&stuff->source); - swaps(&stuff->nbytes); - return ProcXFixesChangeCursorByName(client); -} - /* * Routines for manipulating the per-screen hide counts list. * This list indicates which clients have requested cursor hiding @@ -843,14 +776,13 @@ deleteCursorHideCountsForScreen(ScreenPtr pScreen) int ProcXFixesHideCursor(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesHideCursorReq); + REQUEST_FIELD_CARD32(window); + WindowPtr pWin; CursorHideCountPtr pChc; - - REQUEST(xXFixesHideCursorReq); int ret; - REQUEST_SIZE_MATCH(xXFixesHideCursorReq); - ret = dixLookupResourceByType((void **) &pWin, stuff->window, X11_RESTYPE_WINDOW, client, DixGetAttrAccess); if (ret != Success) { @@ -892,28 +824,16 @@ ProcXFixesHideCursor(ClientPtr client) return ret; } -int _X_COLD -SProcXFixesHideCursor(ClientPtr client) -{ - REQUEST(xXFixesHideCursorReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesHideCursorReq); - swapl(&stuff->window); - return ProcXFixesHideCursor(client); -} - int ProcXFixesShowCursor(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesShowCursorReq); + REQUEST_FIELD_CARD32(window); + WindowPtr pWin; CursorHideCountPtr pChc; int rc; - REQUEST(xXFixesShowCursorReq); - - REQUEST_SIZE_MATCH(xXFixesShowCursorReq); - rc = dixLookupResourceByType((void **) &pWin, stuff->window, X11_RESTYPE_WINDOW, client, DixGetAttrAccess); if (rc != Success) { @@ -942,17 +862,6 @@ ProcXFixesShowCursor(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesShowCursor(ClientPtr client) -{ - REQUEST(xXFixesShowCursorReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesShowCursorReq); - swapl(&stuff->window); - return ProcXFixesShowCursor(client); -} - static int CursorFreeClient(void *data, XID id) { @@ -1003,64 +912,40 @@ CursorFreeWindow(void *data, XID id) int ProcXFixesCreatePointerBarrier(ClientPtr client) { - REQUEST(xXFixesCreatePointerBarrierReq); - + REQUEST_HEAD_AT_LEAST(xXFixesCreatePointerBarrierReq); + REQUEST_FIELD_CARD16(num_devices); REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices * sizeof(CARD16))); + + REQUEST_FIELD_CARD32(barrier); + REQUEST_FIELD_CARD32(window); + REQUEST_FIELD_CARD16(x1); + REQUEST_FIELD_CARD16(y1); + REQUEST_FIELD_CARD16(x2); + REQUEST_FIELD_CARD16(y2); + REQUEST_FIELD_CARD32(directions); + + // FIXME + if (client->swapped) { + CARD16 *in_devices = (CARD16 *) &stuff[1]; + for (int i = 0; i < stuff->num_devices; i++) { + swaps(in_devices + i); + } + } + LEGAL_NEW_RESOURCE(stuff->barrier, client); return XICreatePointerBarrier(client, stuff); } -int _X_COLD -SProcXFixesCreatePointerBarrier(ClientPtr client) -{ - REQUEST(xXFixesCreatePointerBarrierReq); - int i; - CARD16 *in_devices = (CARD16 *) &stuff[1]; - - REQUEST_AT_LEAST_SIZE(xXFixesCreatePointerBarrierReq); - - swaps(&stuff->length); - swaps(&stuff->num_devices); - REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, - pad_to_int32(stuff->num_devices * sizeof(CARD16))); - - swapl(&stuff->barrier); - swapl(&stuff->window); - swaps(&stuff->x1); - swaps(&stuff->y1); - swaps(&stuff->x2); - swaps(&stuff->y2); - swapl(&stuff->directions); - for (i = 0; i < stuff->num_devices; i++) { - swaps(in_devices + i); - } - - return ProcXFixesCreatePointerBarrier(client); -} - int ProcXFixesDestroyPointerBarrier(ClientPtr client) { - REQUEST(xXFixesDestroyPointerBarrierReq); - - REQUEST_SIZE_MATCH(xXFixesDestroyPointerBarrierReq); - + REQUEST_HEAD_STRUCT(xXFixesDestroyPointerBarrierReq); + REQUEST_FIELD_CARD32(barrier); return XIDestroyPointerBarrier(client, stuff); } -int _X_COLD -SProcXFixesDestroyPointerBarrier(ClientPtr client) -{ - REQUEST(xXFixesDestroyPointerBarrierReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesDestroyPointerBarrierReq); - swapl(&stuff->barrier); - return ProcXFixesDestroyPointerBarrier(client); -} - Bool XFixesCursorInit(void) { diff --git a/xfixes/disconnect.c b/xfixes/disconnect.c index 3c573e31bf..ae0d276bde 100644 --- a/xfixes/disconnect.c +++ b/xfixes/disconnect.c @@ -47,6 +47,7 @@ #endif #include "dix/dix_priv.h" +#include "dix/request_priv.h" #include "xfixesint.h" @@ -65,35 +66,21 @@ typedef struct _ClientDisconnect { int ProcXFixesSetClientDisconnectMode(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesSetClientDisconnectModeReq); + REQUEST_FIELD_CARD32(disconnect_mode); + ClientDisconnectPtr pDisconnect = GetClientDisconnect(client); - - REQUEST(xXFixesSetClientDisconnectModeReq); - pDisconnect->disconnect_mode = stuff->disconnect_mode; return Success; } -int _X_COLD -SProcXFixesSetClientDisconnectMode(ClientPtr client) -{ - REQUEST(xXFixesSetClientDisconnectModeReq); - - swaps(&stuff->length); - - REQUEST_AT_LEAST_SIZE(xXFixesSetClientDisconnectModeReq); - - swapl(&stuff->disconnect_mode); - - return ProcXFixesSetClientDisconnectMode(client); -} - int ProcXFixesGetClientDisconnectMode(ClientPtr client) { - ClientDisconnectPtr pDisconnect = GetClientDisconnect(client); + REQUEST_HEAD_STRUCT(xXFixesGetClientDisconnectModeReq); - REQUEST_SIZE_MATCH(xXFixesGetClientDisconnectModeReq); + ClientDisconnectPtr pDisconnect = GetClientDisconnect(client); xXFixesGetClientDisconnectModeReply rep = { .type = X_Reply, @@ -110,18 +97,6 @@ ProcXFixesGetClientDisconnectMode(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesGetClientDisconnectMode(ClientPtr client) -{ - REQUEST(xXFixesGetClientDisconnectModeReq); - - swaps(&stuff->length); - - REQUEST_SIZE_MATCH(xXFixesGetClientDisconnectModeReq); - - return ProcXFixesGetClientDisconnectMode(client); -} - Bool XFixesShouldDisconnectClient(ClientPtr client) { diff --git a/xfixes/region.c b/xfixes/region.c index 6a456c51fc..9576b5b352 100644 --- a/xfixes/region.c +++ b/xfixes/region.c @@ -25,6 +25,7 @@ #endif #include "dix/dix_priv.h" +#include "dix/request_priv.h" #include "render/picturestr_priv.h" #include "xfixesint.h" @@ -71,12 +72,13 @@ XFixesRegionInit(void) int ProcXFixesCreateRegion(ClientPtr client) { + REQUEST_HEAD_AT_LEAST(xXFixesCreateRegionReq); + REQUEST_FIELD_CARD32(region); + REQUEST_REST_CARD16(); + int things; RegionPtr pRegion; - REQUEST(xXFixesCreateRegionReq); - - REQUEST_AT_LEAST_SIZE(xXFixesCreateRegionReq); LEGAL_NEW_RESOURCE(stuff->region, client); things = (client->req_len << 2) - sizeof(xXFixesCreateRegionReq); @@ -93,28 +95,17 @@ ProcXFixesCreateRegion(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesCreateRegion(ClientPtr client) -{ - REQUEST(xXFixesCreateRegionReq); - - swaps(&stuff->length); - REQUEST_AT_LEAST_SIZE(xXFixesCreateRegionReq); - swapl(&stuff->region); - SwapRestS(stuff); - return ProcXFixesCreateRegion(client); -} - int ProcXFixesCreateRegionFromBitmap(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesCreateRegionFromBitmapReq); + REQUEST_FIELD_CARD32(region); + REQUEST_FIELD_CARD32(bitmap); + RegionPtr pRegion; PixmapPtr pPixmap; int rc; - REQUEST(xXFixesCreateRegionFromBitmapReq); - - REQUEST_SIZE_MATCH(xXFixesCreateRegionFromBitmapReq); LEGAL_NEW_RESOURCE(stuff->region, client); rc = dixLookupResourceByType((void **) &pPixmap, stuff->bitmap, X11_RESTYPE_PIXMAP, @@ -137,29 +128,18 @@ ProcXFixesCreateRegionFromBitmap(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesCreateRegionFromBitmap(ClientPtr client) -{ - REQUEST(xXFixesCreateRegionFromBitmapReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesCreateRegionFromBitmapReq); - swapl(&stuff->region); - swapl(&stuff->bitmap); - return ProcXFixesCreateRegionFromBitmap(client); -} - int ProcXFixesCreateRegionFromWindow(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesCreateRegionFromWindowReq); + REQUEST_FIELD_CARD32(region); + REQUEST_FIELD_CARD32(window); + RegionPtr pRegion; Bool copy = TRUE; WindowPtr pWin; int rc; - REQUEST(xXFixesCreateRegionFromWindowReq); - - REQUEST_SIZE_MATCH(xXFixesCreateRegionFromWindowReq); LEGAL_NEW_RESOURCE(stuff->region, client); rc = dixLookupResourceByType((void **) &pWin, stuff->window, X11_RESTYPE_WINDOW, client, DixGetAttrAccess); @@ -196,28 +176,17 @@ ProcXFixesCreateRegionFromWindow(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesCreateRegionFromWindow(ClientPtr client) -{ - REQUEST(xXFixesCreateRegionFromWindowReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesCreateRegionFromWindowReq); - swapl(&stuff->region); - swapl(&stuff->window); - return ProcXFixesCreateRegionFromWindow(client); -} - int ProcXFixesCreateRegionFromGC(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesCreateRegionFromGCReq); + REQUEST_FIELD_CARD32(region); + REQUEST_FIELD_CARD32(gc); + RegionPtr pRegion, pClip; GCPtr pGC; int rc; - REQUEST(xXFixesCreateRegionFromGCReq); - - REQUEST_SIZE_MATCH(xXFixesCreateRegionFromGCReq); LEGAL_NEW_RESOURCE(stuff->region, client); rc = dixLookupGC(&pGC, stuff->gc, client, DixGetAttrAccess); @@ -239,27 +208,16 @@ ProcXFixesCreateRegionFromGC(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesCreateRegionFromGC(ClientPtr client) -{ - REQUEST(xXFixesCreateRegionFromGCReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesCreateRegionFromGCReq); - swapl(&stuff->region); - swapl(&stuff->gc); - return ProcXFixesCreateRegionFromGC(client); -} - int ProcXFixesCreateRegionFromPicture(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesCreateRegionFromPictureReq); + REQUEST_FIELD_CARD32(region); + REQUEST_FIELD_CARD32(picture); + RegionPtr pRegion; PicturePtr pPicture; - REQUEST(xXFixesCreateRegionFromPictureReq); - - REQUEST_SIZE_MATCH(xXFixesCreateRegionFromPictureReq); LEGAL_NEW_RESOURCE(stuff->region, client); VERIFY_PICTURE(pPicture, stuff->picture, client, DixGetAttrAccess); @@ -281,50 +239,29 @@ ProcXFixesCreateRegionFromPicture(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesCreateRegionFromPicture(ClientPtr client) -{ - REQUEST(xXFixesCreateRegionFromPictureReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesCreateRegionFromPictureReq); - swapl(&stuff->region); - swapl(&stuff->picture); - return ProcXFixesCreateRegionFromPicture(client); -} - int ProcXFixesDestroyRegion(ClientPtr client) { - REQUEST(xXFixesDestroyRegionReq); + REQUEST_HEAD_STRUCT(xXFixesDestroyRegionReq); + REQUEST_FIELD_CARD32(region); + RegionPtr pRegion; - REQUEST_SIZE_MATCH(xXFixesDestroyRegionReq); VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess); FreeResource(stuff->region, X11_RESTYPE_NONE); return Success; } -int _X_COLD -SProcXFixesDestroyRegion(ClientPtr client) -{ - REQUEST(xXFixesDestroyRegionReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesDestroyRegionReq); - swapl(&stuff->region); - return ProcXFixesDestroyRegion(client); -} - int ProcXFixesSetRegion(ClientPtr client) { + REQUEST_HEAD_AT_LEAST(xXFixesSetRegionReq); + REQUEST_FIELD_CARD32(region); + REQUEST_REST_CARD16(); + int things; RegionPtr pRegion, pNew; - REQUEST(xXFixesSetRegionReq); - - REQUEST_AT_LEAST_SIZE(xXFixesSetRegionReq); VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess); things = (client->req_len << 2) - sizeof(xXFixesCreateRegionReq); @@ -343,25 +280,14 @@ ProcXFixesSetRegion(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesSetRegion(ClientPtr client) -{ - REQUEST(xXFixesSetRegionReq); - - swaps(&stuff->length); - REQUEST_AT_LEAST_SIZE(xXFixesSetRegionReq); - swapl(&stuff->region); - SwapRestS(stuff); - return ProcXFixesSetRegion(client); -} - int ProcXFixesCopyRegion(ClientPtr client) { - RegionPtr pSource, pDestination; + REQUEST_HEAD_STRUCT(xXFixesCopyRegionReq); + REQUEST_FIELD_CARD32(source); + REQUEST_FIELD_CARD32(destination); - REQUEST(xXFixesCopyRegionReq); - REQUEST_SIZE_MATCH(xXFixesCopyRegionReq); + RegionPtr pSource, pDestination; VERIFY_REGION(pSource, stuff->source, client, DixReadAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess); @@ -372,26 +298,16 @@ ProcXFixesCopyRegion(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesCopyRegion(ClientPtr client) -{ - REQUEST(xXFixesCopyRegionReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesCopyRegionReq); - swapl(&stuff->source); - swapl(&stuff->destination); - return ProcXFixesCopyRegion(client); -} - int ProcXFixesCombineRegion(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesCombineRegionReq); + REQUEST_FIELD_CARD32(source1); + REQUEST_FIELD_CARD32(source2); + REQUEST_FIELD_CARD32(destination); + RegionPtr pSource1, pSource2, pDestination; - REQUEST(xXFixesCombineRegionReq); - - REQUEST_SIZE_MATCH(xXFixesCombineRegionReq); VERIFY_REGION(pSource1, stuff->source1, client, DixReadAccess); VERIFY_REGION(pSource2, stuff->source2, client, DixReadAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess); @@ -414,28 +330,20 @@ ProcXFixesCombineRegion(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesCombineRegion(ClientPtr client) -{ - REQUEST(xXFixesCombineRegionReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesCombineRegionReq); - swapl(&stuff->source1); - swapl(&stuff->source2); - swapl(&stuff->destination); - return ProcXFixesCombineRegion(client); -} - int ProcXFixesInvertRegion(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesInvertRegionReq); + REQUEST_FIELD_CARD32(source); + REQUEST_FIELD_CARD16(x); + REQUEST_FIELD_CARD16(y); + REQUEST_FIELD_CARD16(width); + REQUEST_FIELD_CARD16(height); + REQUEST_FIELD_CARD32(destination); + RegionPtr pSource, pDestination; BoxRec bounds; - REQUEST(xXFixesInvertRegionReq); - - REQUEST_SIZE_MATCH(xXFixesInvertRegionReq); VERIFY_REGION(pSource, stuff->source, client, DixReadAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess); @@ -458,57 +366,32 @@ ProcXFixesInvertRegion(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesInvertRegion(ClientPtr client) -{ - REQUEST(xXFixesInvertRegionReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesInvertRegionReq); - swapl(&stuff->source); - swaps(&stuff->x); - swaps(&stuff->y); - swaps(&stuff->width); - swaps(&stuff->height); - swapl(&stuff->destination); - return ProcXFixesInvertRegion(client); -} - int ProcXFixesTranslateRegion(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesTranslateRegionReq); + REQUEST_FIELD_CARD32(region); + REQUEST_FIELD_CARD16(dx); + REQUEST_FIELD_CARD16(dy); + RegionPtr pRegion; - REQUEST(xXFixesTranslateRegionReq); - - REQUEST_SIZE_MATCH(xXFixesTranslateRegionReq); VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess); RegionTranslate(pRegion, stuff->dx, stuff->dy); return Success; } -int _X_COLD -SProcXFixesTranslateRegion(ClientPtr client) -{ - REQUEST(xXFixesTranslateRegionReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesTranslateRegionReq); - swapl(&stuff->region); - swaps(&stuff->dx); - swaps(&stuff->dy); - return ProcXFixesTranslateRegion(client); -} - int ProcXFixesRegionExtents(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesRegionExtentsReq); + + REQUEST_FIELD_CARD32(source); + REQUEST_FIELD_CARD32(destination); + RegionPtr pSource, pDestination; - REQUEST(xXFixesRegionExtentsReq); - - REQUEST_SIZE_MATCH(xXFixesRegionExtentsReq); VERIFY_REGION(pSource, stuff->source, client, DixReadAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess); @@ -517,29 +400,17 @@ ProcXFixesRegionExtents(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesRegionExtents(ClientPtr client) -{ - REQUEST(xXFixesRegionExtentsReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesRegionExtentsReq); - swapl(&stuff->source); - swapl(&stuff->destination); - return ProcXFixesRegionExtents(client); -} - int ProcXFixesFetchRegion(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesFetchRegionReq); + REQUEST_FIELD_CARD32(region); + RegionPtr pRegion; BoxPtr pExtent; BoxPtr pBox; int i, nBox; - REQUEST(xXFixesFetchRegionReq); - - REQUEST_SIZE_MATCH(xXFixesFetchRegionReq); VERIFY_REGION(pRegion, stuff->region, client, DixReadAccess); pExtent = RegionExtents(pRegion); @@ -579,17 +450,6 @@ ProcXFixesFetchRegion(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesFetchRegion(ClientPtr client) -{ - REQUEST(xXFixesFetchRegionReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesFetchRegionReq); - swapl(&stuff->region); - return ProcXFixesFetchRegion(client); -} - static int PanoramiXFixesSetGCClipRegion(ClientPtr client, xXFixesSetGCClipRegionReq *stuff); @@ -599,8 +459,11 @@ SingleXFixesSetGCClipRegion(ClientPtr client, xXFixesSetGCClipRegionReq *stuff); int ProcXFixesSetGCClipRegion(ClientPtr client) { - REQUEST(xXFixesSetGCClipRegionReq); - REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq); + REQUEST_HEAD_STRUCT(xXFixesSetGCClipRegionReq); + REQUEST_FIELD_CARD32(gc); + REQUEST_FIELD_CARD32(region); + REQUEST_FIELD_CARD16(xOrigin); + REQUEST_FIELD_CARD16(yOrigin); #ifdef PANORAMIX if (XFixesUseXinerama) @@ -638,20 +501,6 @@ SingleXFixesSetGCClipRegion(ClientPtr client, xXFixesSetGCClipRegionReq *stuff) return Success; } -int _X_COLD -SProcXFixesSetGCClipRegion(ClientPtr client) -{ - REQUEST(xXFixesSetGCClipRegionReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq); - swapl(&stuff->gc); - swapl(&stuff->region); - swaps(&stuff->xOrigin); - swaps(&stuff->yOrigin); - return ProcXFixesSetGCClipRegion(client); -} - typedef RegionPtr (*CreateDftPtr) (WindowPtr pWin); static int @@ -731,8 +580,11 @@ PanoramiXFixesSetWindowShapeRegion(ClientPtr client, xXFixesSetWindowShapeRegion int ProcXFixesSetWindowShapeRegion(ClientPtr client) { - REQUEST(xXFixesSetWindowShapeRegionReq); - REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq); + REQUEST_HEAD_STRUCT(xXFixesSetWindowShapeRegionReq); + REQUEST_FIELD_CARD32(dest); + REQUEST_FIELD_CARD16(xOff); + REQUEST_FIELD_CARD16(yOff); + REQUEST_FIELD_CARD32(region); #ifdef PANORAMIX if (XFixesUseXinerama) @@ -741,20 +593,6 @@ ProcXFixesSetWindowShapeRegion(ClientPtr client) return SingleXFixesSetWindowShapeRegion(client, stuff); } -int _X_COLD -SProcXFixesSetWindowShapeRegion(ClientPtr client) -{ - REQUEST(xXFixesSetWindowShapeRegionReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq); - swapl(&stuff->dest); - swaps(&stuff->xOff); - swaps(&stuff->yOff); - swapl(&stuff->region); - return ProcXFixesSetWindowShapeRegion(client); -} - static int SingleXFixesSetPictureClipRegion(ClientPtr client, xXFixesSetPictureClipRegionReq *stuff); @@ -764,8 +602,11 @@ PanoramiXFixesSetPictureClipRegion(ClientPtr client, xXFixesSetPictureClipRegion int ProcXFixesSetPictureClipRegion(ClientPtr client) { - REQUEST(xXFixesSetPictureClipRegionReq); - REQUEST_SIZE_MATCH(xXFixesSetPictureClipRegionReq); + REQUEST_HEAD_STRUCT(xXFixesSetPictureClipRegionReq); + REQUEST_FIELD_CARD32(picture); + REQUEST_FIELD_CARD32(region); + REQUEST_FIELD_CARD16(xOrigin); + REQUEST_FIELD_CARD16(yOrigin); #ifdef PANORAMIX if (XFixesUseXinerama) @@ -790,32 +631,24 @@ SingleXFixesSetPictureClipRegion(ClientPtr client, xXFixesSetPictureClipRegionRe pRegion); } -int _X_COLD -SProcXFixesSetPictureClipRegion(ClientPtr client) -{ - REQUEST(xXFixesSetPictureClipRegionReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesSetPictureClipRegionReq); - swapl(&stuff->picture); - swapl(&stuff->region); - swaps(&stuff->xOrigin); - swaps(&stuff->yOrigin); - return ProcXFixesSetPictureClipRegion(client); -} - int ProcXFixesExpandRegion(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesExpandRegionReq); + REQUEST_FIELD_CARD32(source); + REQUEST_FIELD_CARD32(destination); + REQUEST_FIELD_CARD16(left); + REQUEST_FIELD_CARD16(right); + REQUEST_FIELD_CARD16(top); + REQUEST_FIELD_CARD16(bottom); + RegionPtr pSource, pDestination; - REQUEST(xXFixesExpandRegionReq); BoxPtr pTmp; BoxPtr pSrc; int nBoxes; int i; - REQUEST_SIZE_MATCH(xXFixesExpandRegionReq); VERIFY_REGION(pSource, stuff->source, client, DixReadAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess); @@ -843,22 +676,6 @@ ProcXFixesExpandRegion(ClientPtr client) return Success; } -int _X_COLD -SProcXFixesExpandRegion(ClientPtr client) -{ - REQUEST(xXFixesExpandRegionReq); - - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesExpandRegionReq); - swapl(&stuff->source); - swapl(&stuff->destination); - swaps(&stuff->left); - swaps(&stuff->right); - swaps(&stuff->top); - swaps(&stuff->bottom); - return ProcXFixesExpandRegion(client); -} - #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" diff --git a/xfixes/saveset.c b/xfixes/saveset.c index 1c5704ead1..39848a93b3 100644 --- a/xfixes/saveset.c +++ b/xfixes/saveset.c @@ -25,19 +25,20 @@ #endif #include "dix/dix_priv.h" +#include "dix/request_priv.h" #include "xfixesint.h" int ProcXFixesChangeSaveSet(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesChangeSaveSetReq); + REQUEST_FIELD_CARD32(window); + Bool toRoot, map; int result; WindowPtr pWin; - REQUEST(xXFixesChangeSaveSetReq); - - REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq); result = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); if (result != Success) return result; @@ -59,14 +60,3 @@ ProcXFixesChangeSaveSet(ClientPtr client) map = (stuff->map == SaveSetMap); return AlterSaveSetForClient(client, pWin, stuff->mode, toRoot, map); } - -int _X_COLD -SProcXFixesChangeSaveSet(ClientPtr client) -{ - REQUEST(xXFixesChangeSaveSetReq); - REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq); - - swaps(&stuff->length); - swapl(&stuff->window); - return ProcXFixesChangeSaveSet(client); -} diff --git a/xfixes/select.c b/xfixes/select.c index a39a13f5b9..492643065a 100644 --- a/xfixes/select.c +++ b/xfixes/select.c @@ -25,6 +25,7 @@ #endif #include "dix/dix_priv.h" +#include "dix/request_priv.h" #include "xfixesint.h" #include "xace.h" @@ -184,11 +185,14 @@ XFixesSelectSelectionInput(ClientPtr pClient, int ProcXFixesSelectSelectionInput(ClientPtr client) { - REQUEST(xXFixesSelectSelectionInputReq); + REQUEST_HEAD_STRUCT(xXFixesSelectSelectionInputReq); + REQUEST_FIELD_CARD32(window); + REQUEST_FIELD_CARD32(selection); + REQUEST_FIELD_CARD32(eventMask); + WindowPtr pWin; int rc; - REQUEST_SIZE_MATCH(xXFixesSelectSelectionInputReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; @@ -200,19 +204,6 @@ ProcXFixesSelectSelectionInput(ClientPtr client) pWin, stuff->eventMask); } -int _X_COLD -SProcXFixesSelectSelectionInput(ClientPtr client) -{ - REQUEST(xXFixesSelectSelectionInputReq); - - REQUEST_SIZE_MATCH(xXFixesSelectSelectionInputReq); - swaps(&stuff->length); - swapl(&stuff->window); - swapl(&stuff->selection); - swapl(&stuff->eventMask); - return ProcXFixesSelectSelectionInput(client); -} - void _X_COLD SXFixesSelectionNotifyEvent(xXFixesSelectionNotifyEvent * from, xXFixesSelectionNotifyEvent * to) diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c index 740dcbc51f..ef4e7ff0aa 100644 --- a/xfixes/xfixes.c +++ b/xfixes/xfixes.c @@ -46,6 +46,8 @@ #include #endif +#include "dix/request_priv.h" + #include "xfixesint.h" #include "protocol-versions.h" #include "extinit_priv.h" @@ -61,6 +63,10 @@ static DevPrivateKeyRec XFixesClientPrivateKeyRec; static int ProcXFixesQueryVersion(ClientPtr client) { + REQUEST_HEAD_STRUCT(xXFixesQueryVersionReq); + REQUEST_FIELD_CARD32(majorVersion); + REQUEST_FIELD_CARD32(minorVersion); + int major, minor; XFixesClientPtr pXFixesClient = GetXFixesClient(client); xXFixesQueryVersionReply rep = { @@ -69,10 +75,6 @@ ProcXFixesQueryVersion(ClientPtr client) .length = 0 }; - REQUEST(xXFixesQueryVersionReq); - - REQUEST_SIZE_MATCH(xXFixesQueryVersionReq); - if (version_compare(stuff->majorVersion, stuff->minorVersion, SERVER_XFIXES_MAJOR_VERSION, SERVER_XFIXES_MINOR_VERSION) < 0) { @@ -203,113 +205,6 @@ ProcXFixesDispatch(ClientPtr client) } } -static _X_COLD int -SProcXFixesQueryVersion(ClientPtr client) -{ - REQUEST(xXFixesQueryVersionReq); - REQUEST_SIZE_MATCH(xXFixesQueryVersionReq); - - swaps(&stuff->length); - swapl(&stuff->majorVersion); - swapl(&stuff->minorVersion); - return ProcXFixesQueryVersion(client); -} - -static _X_COLD int -SProcXFixesDispatch(ClientPtr client) -{ - REQUEST(xReq); - XFixesClientPtr pXFixesClient = GetXFixesClient(client); - - if (pXFixesClient->major_version >= ARRAY_SIZE(version_requests)) - return BadRequest; - if (stuff->data > version_requests[pXFixesClient->major_version]) - return BadRequest; - - switch (stuff->data) { - /*************** Version 1 ******************/ - case X_XFixesQueryVersion: - return SProcXFixesQueryVersion(client); - case X_XFixesChangeSaveSet: - return SProcXFixesChangeSaveSet(client); - case X_XFixesSelectSelectionInput: - return SProcXFixesSelectSelectionInput(client); - case X_XFixesSelectCursorInput: - return SProcXFixesSelectCursorInput(client); - case X_XFixesGetCursorImage: - return SProcXFixesGetCursorImage(client); - - /*************** Version 2 ******************/ - case X_XFixesCreateRegion: - return SProcXFixesCreateRegion(client); - case X_XFixesCreateRegionFromBitmap: - return SProcXFixesCreateRegionFromBitmap(client); - case X_XFixesCreateRegionFromWindow: - return SProcXFixesCreateRegionFromWindow(client); - case X_XFixesCreateRegionFromGC: - return SProcXFixesCreateRegionFromGC(client); - case X_XFixesCreateRegionFromPicture: - return SProcXFixesCreateRegionFromPicture(client); - case X_XFixesDestroyRegion: - return SProcXFixesDestroyRegion(client); - case X_XFixesSetRegion: - return SProcXFixesSetRegion(client); - case X_XFixesCopyRegion: - return SProcXFixesCopyRegion(client); - case X_XFixesUnionRegion: - return SProcXFixesCombineRegion(client); - case X_XFixesIntersectRegion: - return SProcXFixesCombineRegion(client); - case X_XFixesSubtractRegion: - return SProcXFixesCombineRegion(client); - case X_XFixesInvertRegion: - return SProcXFixesInvertRegion(client); - case X_XFixesTranslateRegion: - return SProcXFixesTranslateRegion(client); - case X_XFixesRegionExtents: - return SProcXFixesRegionExtents(client); - case X_XFixesFetchRegion: - return SProcXFixesFetchRegion(client); - case X_XFixesSetGCClipRegion: - return SProcXFixesSetGCClipRegion(client); - case X_XFixesSetWindowShapeRegion: - return SProcXFixesSetWindowShapeRegion(client); - case X_XFixesSetPictureClipRegion: - return SProcXFixesSetPictureClipRegion(client); - case X_XFixesSetCursorName: - return SProcXFixesSetCursorName(client); - case X_XFixesGetCursorName: - return SProcXFixesGetCursorName(client); - case X_XFixesGetCursorImageAndName: - return SProcXFixesGetCursorImageAndName(client); - case X_XFixesChangeCursor: - return SProcXFixesChangeCursor(client); - case X_XFixesChangeCursorByName: - return SProcXFixesChangeCursorByName(client); - - /*************** Version 3 ******************/ - case X_XFixesExpandRegion: - return SProcXFixesExpandRegion(client); - /*************** Version 4 ******************/ - case X_XFixesHideCursor: - return SProcXFixesHideCursor(client); - case X_XFixesShowCursor: - return SProcXFixesShowCursor(client); - /*************** Version 5 ******************/ - case X_XFixesCreatePointerBarrier: - return SProcXFixesCreatePointerBarrier(client); - case X_XFixesDestroyPointerBarrier: - return SProcXFixesDestroyPointerBarrier(client); - /*************** Version 6 ******************/ - case X_XFixesSetClientDisconnectMode: - return SProcXFixesSetClientDisconnectMode(client); - case X_XFixesGetClientDisconnectMode: - return SProcXFixesGetClientDisconnectMode(client); - default: - return BadRequest; - } -} - void XFixesExtensionInit(void) { @@ -325,7 +220,7 @@ XFixesExtensionInit(void) XFixesClientDisconnectInit() && (extEntry = AddExtension(XFIXES_NAME, XFixesNumberEvents, XFixesNumberErrors, - ProcXFixesDispatch, SProcXFixesDispatch, + ProcXFixesDispatch, ProcXFixesDispatch, NULL, StandardMinorOpcode)) != 0) { XFixesReqCode = (unsigned char) extEntry->base; XFixesEventBase = extEntry->eventBase; diff --git a/xfixes/xfixesint.h b/xfixes/xfixesint.h index 1b46915ed4..8a4a211be9 100644 --- a/xfixes/xfixesint.h +++ b/xfixes/xfixesint.h @@ -73,16 +73,10 @@ typedef struct _XFixesClient { int ProcXFixesChangeSaveSet(ClientPtr client); -int - SProcXFixesChangeSaveSet(ClientPtr client); - /* Selection events */ int ProcXFixesSelectSelectionInput(ClientPtr client); -int - SProcXFixesSelectSelectionInput(ClientPtr client); - void SXFixesSelectionNotifyEvent(xXFixesSelectionNotifyEvent * from, @@ -97,54 +91,32 @@ Bool int ProcXFixesSelectCursorInput(ClientPtr client); -int - SProcXFixesSelectCursorInput(ClientPtr client); - void - SXFixesCursorNotifyEvent(xXFixesCursorNotifyEvent * from, xXFixesCursorNotifyEvent * to); int ProcXFixesGetCursorImage(ClientPtr client); -int - SProcXFixesGetCursorImage(ClientPtr client); - /* Cursor names (Version 2) */ int ProcXFixesSetCursorName(ClientPtr client); -int - SProcXFixesSetCursorName(ClientPtr client); - int ProcXFixesGetCursorName(ClientPtr client); -int - SProcXFixesGetCursorName(ClientPtr client); - int ProcXFixesGetCursorImageAndName(ClientPtr client); -int - SProcXFixesGetCursorImageAndName(ClientPtr client); - /* Cursor replacement (Version 2) */ int ProcXFixesChangeCursor(ClientPtr client); -int - SProcXFixesChangeCursor(ClientPtr client); - int ProcXFixesChangeCursorByName(ClientPtr client); -int - SProcXFixesChangeCursorByName(ClientPtr client); - /* Region objects (Version 2* */ Bool XFixesRegionInit(void); @@ -152,133 +124,70 @@ Bool int ProcXFixesCreateRegion(ClientPtr client); -int - SProcXFixesCreateRegion(ClientPtr client); - int ProcXFixesCreateRegionFromBitmap(ClientPtr client); -int - SProcXFixesCreateRegionFromBitmap(ClientPtr client); - int ProcXFixesCreateRegionFromWindow(ClientPtr client); -int - SProcXFixesCreateRegionFromWindow(ClientPtr client); - int ProcXFixesCreateRegionFromGC(ClientPtr client); -int - SProcXFixesCreateRegionFromGC(ClientPtr client); - int ProcXFixesCreateRegionFromPicture(ClientPtr client); -int - SProcXFixesCreateRegionFromPicture(ClientPtr client); - int ProcXFixesDestroyRegion(ClientPtr client); -int - SProcXFixesDestroyRegion(ClientPtr client); - int ProcXFixesSetRegion(ClientPtr client); -int - SProcXFixesSetRegion(ClientPtr client); - int ProcXFixesCopyRegion(ClientPtr client); -int - SProcXFixesCopyRegion(ClientPtr client); - int ProcXFixesCombineRegion(ClientPtr client); -int - SProcXFixesCombineRegion(ClientPtr client); - int ProcXFixesInvertRegion(ClientPtr client); -int - SProcXFixesInvertRegion(ClientPtr client); - int ProcXFixesTranslateRegion(ClientPtr client); -int - SProcXFixesTranslateRegion(ClientPtr client); - int ProcXFixesRegionExtents(ClientPtr client); -int - SProcXFixesRegionExtents(ClientPtr client); - int ProcXFixesFetchRegion(ClientPtr client); -int - SProcXFixesFetchRegion(ClientPtr client); - int ProcXFixesSetGCClipRegion(ClientPtr client); -int - SProcXFixesSetGCClipRegion(ClientPtr client); - int ProcXFixesSetWindowShapeRegion(ClientPtr client); -int - SProcXFixesSetWindowShapeRegion(ClientPtr client); - int ProcXFixesSetPictureClipRegion(ClientPtr client); -int - SProcXFixesSetPictureClipRegion(ClientPtr client); - int ProcXFixesExpandRegion(ClientPtr client); -int - SProcXFixesExpandRegion(ClientPtr client); - /* Cursor Visibility (Version 4) */ int ProcXFixesHideCursor(ClientPtr client); -int - SProcXFixesHideCursor(ClientPtr client); - int ProcXFixesShowCursor(ClientPtr client); -int - SProcXFixesShowCursor(ClientPtr client); - /* Version 5 */ int ProcXFixesCreatePointerBarrier(ClientPtr client); -int - SProcXFixesCreatePointerBarrier(ClientPtr client); - int ProcXFixesDestroyPointerBarrier(ClientPtr client); -int - SProcXFixesDestroyPointerBarrier(ClientPtr client); - /* Version 6 */ Bool @@ -290,12 +199,6 @@ int int ProcXFixesGetClientDisconnectMode(ClientPtr client); -int - SProcXFixesSetClientDisconnectMode(ClientPtr client); - -int - SProcXFixesGetClientDisconnectMode(ClientPtr client); - Bool XFixesShouldDisconnectClient(ClientPtr client);