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 <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2024-07-12 12:45:55 +02:00
parent f3b783ec3d
commit d5e3eaeba2
6 changed files with 136 additions and 261 deletions

View File

@@ -23,6 +23,7 @@
#include <dix-config.h>
#include "dix/dix_priv.h"
#include "dix/request_priv.h"
#include "dix/resource_priv.h"
#include "xfixesint.h"
@@ -30,16 +31,13 @@
int
ProcXFixesChangeSaveSet(ClientPtr client)
{
X_REQUEST_HEAD_STRUCT(xXFixesChangeSaveSetReq);
X_REQUEST_FIELD_CARD32(window);
Bool toRoot, map;
int result;
WindowPtr pWin;
REQUEST(xXFixesChangeSaveSetReq);
REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq);
if (client->swapped)
swapl(&stuff->window);
result = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess);
if (result != Success)
return result;