From 04c885de715a7c989e48fc8cf2e61db2b401de2d Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sat, 3 Nov 2012 20:23:43 -0400 Subject: cursor: CreatePointerBarrier has a variable request length Support this, and swap the devices in the SProc as well. Don't actually do anything with the devices just yet -- specifying any should still emit a BadImplementation. Based on a patch by Peter Hutterer Signed-off-by: Jasper St. Pierre Signed-off-by: Peter Hutterer --- xfixes/cursor.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'xfixes') diff --git a/xfixes/cursor.c b/xfixes/cursor.c index c45da27a9..75b03749d 100644 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -1279,7 +1279,7 @@ ProcXFixesCreatePointerBarrier(ClientPtr client) REQUEST(xXFixesCreatePointerBarrierReq); - REQUEST_SIZE_MATCH(xXFixesCreatePointerBarrierReq); + REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices)); LEGAL_NEW_RESOURCE(stuff->barrier, client); err = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); @@ -1318,9 +1318,13 @@ int SProcXFixesCreatePointerBarrier(ClientPtr client) { REQUEST(xXFixesCreatePointerBarrierReq); + int i; + CARD16 *in_devices = (CARD16 *) &stuff[1]; swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXFixesCreatePointerBarrierReq); + swaps(&stuff->num_devices); + REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices)); + swapl(&stuff->barrier); swapl(&stuff->window); swaps(&stuff->x1); @@ -1328,6 +1332,10 @@ SProcXFixesCreatePointerBarrier(ClientPtr client) swaps(&stuff->x2); swaps(&stuff->y2); swapl(&stuff->directions); + for (i = 0; i < stuff->num_devices; i++) { + swaps(in_devices + i); + } + return ProcXFixesVector[stuff->xfixesReqType] (client); } -- cgit v1.2.3