From 5109c7f6581b3e4e23700bfd03b4daf0ba97630e Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 20 Sep 2012 11:19:39 -0400 Subject: [PATCH 1/7] xfree86: Bump video ABI to 14 Signed-off-by: Adam Jackson --- hw/xfree86/common/xf86Module.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h index 83f9790d2..fd90aac54 100644 --- a/hw/xfree86/common/xf86Module.h +++ b/hw/xfree86/common/xf86Module.h @@ -80,7 +80,7 @@ typedef enum { * mask is 0xFFFF0000. */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) -#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(13, 0) +#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(14, 0) #define ABI_XINPUT_VERSION SET_ABI_VERSION(18, 0) #define ABI_EXTENSION_VERSION SET_ABI_VERSION(7, 0) #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6) From 3f7bc222638d5d38324ecbc8c2c4e39af17d110e Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 16 Jun 2011 17:40:24 -0400 Subject: [PATCH 2/7] os: Repack ConnectionOutput for LP64 Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson --- os/osdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/osdep.h b/os/osdep.h index fff088701..587bd0359 100644 --- a/os/osdep.h +++ b/os/osdep.h @@ -119,8 +119,8 @@ typedef struct _connectionInput { typedef struct _connectionOutput { struct _connectionOutput *next; - int size; unsigned char *buf; + int size; int count; } ConnectionOutput, *ConnectionOutputPtr; From ff8e3ad8074cd2c8bed49b39c40c2b4892118270 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 20 Sep 2012 13:16:59 -0400 Subject: [PATCH 3/7] dix: Pull client-is-local flag up to the ClientRec Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson --- Xext/xf86bigfont.c | 4 ++-- hw/kdrive/ephyr/ephyrdriext.c | 4 ++-- hw/xfree86/common/xf86DGA.c | 2 +- hw/xfree86/common/xf86vmode.c | 6 +++--- hw/xfree86/dri/xf86dri.c | 4 ++-- hw/xfree86/dri2/dri2ext.c | 2 +- hw/xquartz/applewm.c | 4 ++-- hw/xquartz/xpr/appledri.c | 6 +++--- hw/xwin/winwindowswm.c | 4 ++-- include/dixstruct.h | 1 + include/os.h | 3 --- os/access.c | 10 +--------- os/connection.c | 2 +- os/osdep.h | 1 - 14 files changed, 21 insertions(+), 32 deletions(-) diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c index b4ef5e460..faf81f7dc 100644 --- a/Xext/xf86bigfont.c +++ b/Xext/xf86bigfont.c @@ -288,7 +288,7 @@ ProcXF86BigfontQueryVersion(ClientPtr client) .gid = getegid(), #ifdef HAS_SHM .signature = signature, - .capabilities = (LocalClient(client) && !client->swapped) + .capabilities = (client->local && !client->swapped) ? XF86Bigfont_CAP_LocalShm : 0 #else .signature = 0, @@ -357,7 +357,7 @@ ProcXF86BigfontQueryFont(ClientPtr client) #else switch (client->req_len) { case 2: /* client with version 1.0 libX11 */ - stuff_flags = (LocalClient(client) && + stuff_flags = (client->local && !client->swapped ? XF86Bigfont_FLAGS_Shm : 0); break; case 3: /* client with version 1.1 libX11 */ diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c index a42be07d5..1a98a2dff 100644 --- a/hw/kdrive/ephyr/ephyrdriext.c +++ b/hw/kdrive/ephyr/ephyrdriext.c @@ -561,7 +561,7 @@ ProcXF86DRIQueryDirectRenderingCapable(register ClientPtr client) return BadValue; } - if (!LocalClient(client) || client->swapped) + if (!client->local || client->swapped) isCapable = 0; rep = (xXF86DRIQueryDirectRenderingCapableReply) { @@ -1229,7 +1229,7 @@ ProcXF86DRIDispatch(register ClientPtr client) } } - if (!LocalClient(client)) + if (!client->local) return DRIErrorBase + XF86DRIClientNotLocal; switch (stuff->data) { diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index a441dee99..c25a2747b 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -2095,7 +2095,7 @@ ProcXDGADispatch(ClientPtr client) { REQUEST(xReq); - if (!LocalClient(client)) + if (!client->local) return DGAErrorBase + XF86DGAClientNotLocal; #ifdef DGA_REQ_DEBUG diff --git a/hw/xfree86/common/xf86vmode.c b/hw/xfree86/common/xf86vmode.c index 7cd2eedb3..cad0e6a21 100644 --- a/hw/xfree86/common/xf86vmode.c +++ b/hw/xfree86/common/xf86vmode.c @@ -1590,7 +1590,7 @@ ProcXF86VidModeGetPermissions(ClientPtr client) return BadValue; if (xf86GetVidModeEnabled() && - (xf86GetVidModeAllowNonLocal() || LocalClient(client))) { + (xf86GetVidModeAllowNonLocal() || client->local)) { rep.permissions |= XF86VM_WRITE_PERMISSION; } if (client->swapped) { @@ -1659,7 +1659,7 @@ ProcXF86VidModeDispatch(ClientPtr client) default: if (!xf86GetVidModeEnabled()) return VidModeErrorBase + XF86VidModeExtensionDisabled; - if (xf86GetVidModeAllowNonLocal() || LocalClient(client)) { + if (xf86GetVidModeAllowNonLocal() || client->local) { switch (stuff->data) { case X_XF86VidModeAddModeLine: return ProcXF86VidModeAddModeLine(client); @@ -2083,7 +2083,7 @@ SProcXF86VidModeDispatch(ClientPtr client) default: if (!xf86GetVidModeEnabled()) return VidModeErrorBase + XF86VidModeExtensionDisabled; - if (xf86GetVidModeAllowNonLocal() || LocalClient(client)) { + if (xf86GetVidModeAllowNonLocal() || client->local) { switch (stuff->data) { case X_XF86VidModeAddModeLine: return SProcXF86VidModeAddModeLine(client); diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c index ba74bb04f..0b2e8fa1b 100644 --- a/hw/xfree86/dri/xf86dri.c +++ b/hw/xfree86/dri/xf86dri.c @@ -118,7 +118,7 @@ ProcXF86DRIQueryDirectRenderingCapable(register ClientPtr client) return BadValue; } - if (!LocalClient(client) || client->swapped) + if (!client->local || client->swapped) isCapable = 0; rep = (xXF86DRIQueryDirectRenderingCapableReply) { @@ -528,7 +528,7 @@ ProcXF86DRIDispatch(register ClientPtr client) return ProcXF86DRIQueryDirectRenderingCapable(client); } - if (!LocalClient(client)) + if (!client->local) return DRIErrorBase + XF86DRIClientNotLocal; switch (stuff->data) { diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c index ee610c0ec..e1decec9e 100644 --- a/hw/xfree86/dri2/dri2ext.c +++ b/hw/xfree86/dri2/dri2ext.c @@ -588,7 +588,7 @@ ProcDRI2Dispatch(ClientPtr client) return ProcDRI2QueryVersion(client); } - if (!LocalClient(client)) + if (!client->local) return BadRequest; switch (stuff->data) { diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c index d41a81db3..aea0a45f2 100644 --- a/hw/xquartz/applewm.c +++ b/hw/xquartz/applewm.c @@ -612,7 +612,7 @@ ProcAppleWMDispatch(register ClientPtr client) return ProcAppleWMQueryVersion(client); } - if (!LocalClient(client)) + if (!client->local) return WMErrorBase + AppleWMClientNotLocal; switch (stuff->data) { @@ -684,7 +684,7 @@ SProcAppleWMDispatch(register ClientPtr client) REQUEST(xReq); /* It is bound to be non-local when there is byte swapping */ - if (!LocalClient(client)) + if (!client->local) return WMErrorBase + AppleWMClientNotLocal; /* only local clients are allowed WM access */ diff --git a/hw/xquartz/xpr/appledri.c b/hw/xquartz/xpr/appledri.c index f77848f13..9aac07240 100644 --- a/hw/xquartz/xpr/appledri.c +++ b/hw/xquartz/xpr/appledri.c @@ -129,7 +129,7 @@ ProcAppleDRIQueryDirectRenderingCapable(register ClientPtr client) } rep.isCapable = isCapable; - if (!LocalClient(client)) + if (!client->local) rep.isCapable = 0; if (client->swapped) { @@ -354,7 +354,7 @@ ProcAppleDRIDispatch(register ClientPtr client) return ProcAppleDRIQueryDirectRenderingCapable(client); } - if (!LocalClient(client)) + if (!client->local) return DRIErrorBase + AppleDRIClientNotLocal; switch (stuff->data) { @@ -469,7 +469,7 @@ SProcAppleDRIDispatch(register ClientPtr client) return SProcAppleDRIQueryDirectRenderingCapable(client); } - if (!LocalClient(client)) + if (!client->local) return DRIErrorBase + AppleDRIClientNotLocal; switch (stuff->data) { diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c index 5d513a893..88c375733 100644 --- a/hw/xwin/winwindowswm.c +++ b/hw/xwin/winwindowswm.c @@ -525,7 +525,7 @@ ProcWindowsWMDispatch(ClientPtr client) return ProcWindowsWMQueryVersion(client); } - if (!LocalClient(client)) + if (!client->local) return WMErrorBase + WindowsWMClientNotLocal; switch (stuff->data) { @@ -575,7 +575,7 @@ SProcWindowsWMDispatch(ClientPtr client) REQUEST(xReq); /* It is bound to be non-local when there is byte swapping */ - if (!LocalClient(client)) + if (!client->local) return WMErrorBase + WindowsWMClientNotLocal; /* only local clients are allowed WM access */ diff --git a/include/dixstruct.h b/include/dixstruct.h index b2a168aa8..875f6caac 100644 --- a/include/dixstruct.h +++ b/include/dixstruct.h @@ -91,6 +91,7 @@ typedef struct _Client { pointer requestBuffer; pointer osPrivate; /* for OS layer, including scheduler */ Bool swapped; + Bool local; ReplySwapPtr pSwapReplyFunc; XID errorValue; int sequence; diff --git a/include/os.h b/include/os.h index 9e323f331..e32421610 100644 --- a/include/os.h +++ b/include/os.h @@ -406,9 +406,6 @@ typedef struct sockaddr *sockaddrPtr; extern _X_EXPORT int InvalidHost(sockaddrPtr /*saddr */ , int /*len */ , ClientPtr client); -extern _X_EXPORT int -LocalClient(ClientPtr /* client */ ); - extern _X_EXPORT int LocalClientCred(ClientPtr, int *, int *); diff --git a/os/access.c b/os/access.c index 550f2ed8c..104b6a713 100644 --- a/os/access.c +++ b/os/access.c @@ -1007,14 +1007,6 @@ ComputeLocalClient(ClientPtr client) return FALSE; } -Bool -LocalClient(ClientPtr client) -{ - if (!client->osPrivate) - return FALSE; - return ((OsCommPtr) client->osPrivate)->local_client; -} - /* * Return the uid and gid of a connected local client * @@ -1176,7 +1168,7 @@ AuthorizedClient(ClientPtr client) if (rc != Success) return rc; - return LocalClient(client) ? Success : BadAccess; + return client->local ? Success : BadAccess; } /* Add a host to the access control list. This is the external interface diff --git a/os/connection.c b/os/connection.c index 721ad65b3..d27116aed 100644 --- a/os/connection.c +++ b/os/connection.c @@ -764,7 +764,7 @@ AllocNewConnection(XtransConnInfo trans_conn, int fd, CARD32 conn_time) free(oc); return NullClient; } - oc->local_client = ComputeLocalClient(client); + client->local = ComputeLocalClient(client); #if !defined(WIN32) ConnectionTranslation[fd] = client->index; #else diff --git a/os/osdep.h b/os/osdep.h index 587bd0359..55db16fe9 100644 --- a/os/osdep.h +++ b/os/osdep.h @@ -162,7 +162,6 @@ typedef struct _osComm { XID auth_id; /* authorization id */ CARD32 conn_time; /* timestamp if not established, else 0 */ struct _XtransConnInfo *trans_conn; /* transport connection object */ - Bool local_client; } OsCommRec, *OsCommPtr; extern int FlushClient(ClientPtr /*who */ , From 31bf81772e146af79b0c456aae2159eba8b0280f Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 20 Sep 2012 14:00:09 -0400 Subject: [PATCH 4/7] dix: Repack ClientRec Pick smaller types where possible, including bitfielding some Bools and small enums, then shuffle the result to be hole-free. 192 -> 128 bytes on LP64, 144 -> 96 bytes on ILP32. Signed-off-by: Adam Jackson --- include/dixstruct.h | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/include/dixstruct.h b/include/dixstruct.h index 875f6caac..c1236f5c9 100644 --- a/include/dixstruct.h +++ b/include/dixstruct.h @@ -56,8 +56,7 @@ ReplyNotSwappd(ClientPtr /* pClient */ , void * /* pbuf */ ) _X_NORETURN; typedef enum { ClientStateInitial, - /* 1 is unused now, was ClientStateAuthenticating */ - ClientStateRunning = 2, + ClientStateRunning, ClientStateRetained, ClientStateGone } ClientState; @@ -86,27 +85,29 @@ typedef struct _Window *SaveSetElt; #endif typedef struct _Client { - int index; - Mask clientAsMask; pointer requestBuffer; pointer osPrivate; /* for OS layer, including scheduler */ - Bool swapped; - Bool local; + Mask clientAsMask; + short index; + unsigned char majorOp, minorOp; + int swapped:1; + int local:1; + int big_requests:1; /* supports large requests */ + int clientGone:1; + int closeDownMode:2; + int clientState:2; + char smart_priority; + short noClientException; /* this client died or needs to be killed */ + int priority; ReplySwapPtr pSwapReplyFunc; XID errorValue; int sequence; - int closeDownMode; - int clientGone; - int noClientException; /* this client died or needs to be - * killed */ int ignoreCount; /* count for Attend/IgnoreClient */ - SaveSetElt *saveSet; int numSaved; + SaveSetElt *saveSet; int (**requestVector) (ClientPtr /* pClient */ ); CARD32 req_len; /* length of current request */ - Bool big_requests; /* supports large requests */ - int priority; - ClientState clientState; + unsigned int replyBytesRemaining; PrivateRec *devPrivates; unsigned short xkbClientFlags; unsigned short mapNotifyMask; @@ -114,15 +115,12 @@ typedef struct _Client { unsigned short vMajor, vMinor; KeyCode minKC, maxKC; - unsigned long replyBytesRemaining; - int smart_priority; - long smart_start_tick; - long smart_stop_tick; - long smart_check_tick; + int smart_start_tick; + int smart_stop_tick; + int smart_check_tick; DeviceIntPtr clientPtr; ClientIdPtr clientIds; - unsigned short majorOp, minorOp; } ClientRec; /* From e2c7d70e5ddb8b17676a13ceebfbb87d14d63243 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 17 Jun 2011 13:43:38 -0400 Subject: [PATCH 5/7] dix: Extend initial connection handshake for forwarding proxies Forwarding proxies like sshd will appear to be local, even though they aren't really. This leads to weird behaviour for extensions that truly require running under the same OS services as the client, like MIT-SHM and DRI2. Add two new legal values for the initial connection's byteOrder field, 'r' and 'R'. These act like 'l' and 'B' respectively, but have the side effect of forcing the client to be treated as non-local. Forwarding proxies should attempt to munge the first packet of the connection accordingly; older servers will reject connections thusly munged, so the proxy should fall back to passthrough if the munged connection attempt fails. Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson --- dix/dispatch.c | 19 ++++++++++++------- os/connection.c | 10 +++++----- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 0ce10c2f7..2df1a6ea5 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3499,14 +3499,16 @@ ProcInitialConnection(ClientPtr client) REQUEST(xReq); xConnClientPrefix *prefix; int whichbyte = 1; + char order; - prefix = (xConnClientPrefix *) ((char *) stuff + sz_xReq); - if ((prefix->byteOrder != 'l') && (prefix->byteOrder != 'B')) - return client->noClientException = -1; - if (((*(char *) &whichbyte) && (prefix->byteOrder == 'B')) || - (!(*(char *) &whichbyte) && (prefix->byteOrder == 'l'))) { - client->swapped = TRUE; - SwapConnClientPrefix(prefix); + prefix = (xConnClientPrefix *) ((char *)stuff + sz_xReq); + order = prefix->byteOrder; + if (order != 'l' && order != 'B' && order != 'r' && order != 'R') + return client->noClientException = -1; + if (((*(char *) &whichbyte) && (order == 'B' || order == 'R')) || + (!(*(char *) &whichbyte) && (order == 'l' || order == 'r'))) { + client->swapped = TRUE; + SwapConnClientPrefix(prefix); } stuff->reqType = 2; stuff->length += bytes_to_int32(prefix->nbytesAuthProto) + @@ -3514,6 +3516,9 @@ ProcInitialConnection(ClientPtr client) if (client->swapped) { swaps(&stuff->length); } + if (order == 'r' || order == 'R') { + client->local = FALSE; + } ResetCurrentRequest(client); return Success; } diff --git a/os/connection.c b/os/connection.c index d27116aed..4561caaa7 100644 --- a/os/connection.c +++ b/os/connection.c @@ -894,7 +894,7 @@ ErrorConnMax(XtransConnInfo trans_conn) xConnSetupPrefix csp; char pad[3] = { 0, 0, 0 }; struct iovec iov[3]; - char byteOrder = 0; + char order = 0; int whichbyte = 1; struct timeval waittime; fd_set mask; @@ -907,15 +907,15 @@ ErrorConnMax(XtransConnInfo trans_conn) FD_SET(fd, &mask); (void) Select(fd + 1, &mask, NULL, NULL, &waittime); /* try to read the byte-order of the connection */ - (void) _XSERVTransRead(trans_conn, &byteOrder, 1); - if ((byteOrder == 'l') || (byteOrder == 'B')) { + (void) _XSERVTransRead(trans_conn, &order, 1); + if (order == 'l' || order == 'B' || order == 'r' || order == 'R') { csp.success = xFalse; csp.lengthReason = sizeof(NOROOM) - 1; csp.length = (sizeof(NOROOM) + 2) >> 2; csp.majorVersion = X_PROTOCOL; csp.minorVersion = X_PROTOCOL_REVISION; - if (((*(char *) &whichbyte) && (byteOrder == 'B')) || - (!(*(char *) &whichbyte) && (byteOrder == 'l'))) { + if (((*(char *) &whichbyte) && (order == 'B' || order == 'R')) || + (!(*(char *) &whichbyte) && (order == 'l' || order == 'r'))) { swaps(&csp.majorVersion); swaps(&csp.minorVersion); swaps(&csp.length); From 092c57ab173c8b71056f6feb3b9d04d063a46579 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 17 Jun 2011 14:03:01 -0400 Subject: [PATCH 6/7] os: Hide the Connection{In,Out}put implementation details Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson --- os/connection.c | 4 ++-- os/io.c | 21 +++++++++++++++++++-- os/osdep.h | 18 ++---------------- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/os/connection.c b/os/connection.c index 4561caaa7..6cd8bcf43 100644 --- a/os/connection.c +++ b/os/connection.c @@ -1038,8 +1038,8 @@ CloseDownConnection(ClientPtr client) if (FlushCallback) CallCallbacks(&FlushCallback, NULL); - if (oc->output && oc->output->count) - FlushClient(client, oc, (char *) NULL, 0); + if (oc->output) + FlushClient(client, oc, (char *) NULL, 0); #ifdef XDMCP XdmcpCloseDisplay(oc->fd); #endif diff --git a/os/io.c b/os/io.c index e44db3933..015f1379e 100644 --- a/os/io.c +++ b/os/io.c @@ -82,6 +82,23 @@ SOFTWARE. CallbackListPtr ReplyCallback; CallbackListPtr FlushCallback; +typedef struct _connectionInput { + struct _connectionInput *next; + char *buffer; /* contains current client input */ + char *bufptr; /* pointer to current start of data */ + int bufcnt; /* count of bytes in buffer */ + int lenLastReq; + int size; + unsigned int ignoreBytes; /* bytes to ignore before the next request */ +} ConnectionInput, *ConnectionInputPtr; + +typedef struct _connectionOutput { + struct _connectionOutput *next; + unsigned char *buf; + int size; + int count; +} ConnectionOutput, *ConnectionOutputPtr; + static ConnectionInputPtr AllocateInputBuffer(void); static ConnectionOutputPtr AllocateOutputBuffer(void); @@ -845,8 +862,8 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount) long notWritten; long todo; - if (!oco) - return 0; + if (!oco || !oco->count) + return 0; written = 0; padsize = padding_for_int32(extraCount); notWritten = oco->count + extraCount + padsize; diff --git a/os/osdep.h b/os/osdep.h index 55db16fe9..0ccdb62ef 100644 --- a/os/osdep.h +++ b/os/osdep.h @@ -107,22 +107,8 @@ typedef Bool (*AddAuthorFunc) (unsigned name_length, const char *name, unsigned data_length, char *data); #endif -typedef struct _connectionInput { - struct _connectionInput *next; - char *buffer; /* contains current client input */ - char *bufptr; /* pointer to current start of data */ - int bufcnt; /* count of bytes in buffer */ - int lenLastReq; - int size; - unsigned int ignoreBytes; /* bytes to ignore before the next request */ -} ConnectionInput, *ConnectionInputPtr; - -typedef struct _connectionOutput { - struct _connectionOutput *next; - unsigned char *buf; - int size; - int count; -} ConnectionOutput, *ConnectionOutputPtr; +typedef struct _connectionInput *ConnectionInputPtr; +typedef struct _connectionOutput *ConnectionOutputPtr; struct _osComm; From 506e3437c73e5ae935ff7c056d7808fbb0c7e614 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 20 Sep 2012 14:22:48 -0400 Subject: [PATCH 7/7] dix: Fix types in WindowOptRec No reason for these to be 64 bits on LP64. Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson --- include/windowstr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/windowstr.h b/include/windowstr.h index 9caafba41..a1e608f09 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -86,8 +86,8 @@ typedef struct _WindowOpt { struct _OtherClients *otherClients; /* default: NULL */ struct _GrabRec *passiveGrabs; /* default: NULL */ PropertyPtr userProps; /* default: NULL */ - unsigned long backingBitPlanes; /* default: ~0L */ - unsigned long backingPixel; /* default: 0 */ + CARD32 backingBitPlanes; /* default: ~0L */ + CARD32 backingPixel; /* default: 0 */ RegionPtr boundingShape; /* default: NULL */ RegionPtr clipShape; /* default: NULL */ RegionPtr inputShape; /* default: NULL */