Convert callers of LookupWindow() to dixLookupWindow().
This commit is contained in:
parent
670bbb8731
commit
04c721854f
|
@ -355,13 +355,15 @@ int AttrValidate(
|
||||||
AppGroupPtr pAppGrp)
|
AppGroupPtr pAppGrp)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
int idepth, ivids, found;
|
int idepth, ivids, found, rc;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
DepthPtr pDepth;
|
DepthPtr pDepth;
|
||||||
ColormapPtr pColormap;
|
ColormapPtr pColormap;
|
||||||
|
|
||||||
pWin = LookupWindow (pAppGrp->default_root, client);
|
rc = dixLookupWindow(&pWin, pAppGrp->default_root, client,
|
||||||
/* XXX check that pWin is not NULL */
|
DixUnknownAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
if (WindowTable[pScreen->myNum]->drawable.id != pAppGrp->default_root)
|
if (WindowTable[pScreen->myNum]->drawable.id != pAppGrp->default_root)
|
||||||
return BadWindow;
|
return BadWindow;
|
||||||
|
|
31
Xext/mbuf.c
31
Xext/mbuf.c
|
@ -448,16 +448,15 @@ ProcCreateImageBuffers (client)
|
||||||
register int n;
|
register int n;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
XID *ids;
|
XID *ids;
|
||||||
int len, nbuf;
|
int len, nbuf, i, err, rc;
|
||||||
int i;
|
|
||||||
int err;
|
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE (xMbufCreateImageBuffersReq);
|
REQUEST_AT_LEAST_SIZE (xMbufCreateImageBuffersReq);
|
||||||
len = stuff->length - (sizeof(xMbufCreateImageBuffersReq) >> 2);
|
len = stuff->length - (sizeof(xMbufCreateImageBuffersReq) >> 2);
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
if (!(pWin = LookupWindow (stuff->window, client)))
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
return BadWindow;
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
if (pWin->drawable.class == InputOnly)
|
if (pWin->drawable.class == InputOnly)
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
switch (stuff->updateAction)
|
switch (stuff->updateAction)
|
||||||
|
@ -584,10 +583,12 @@ ProcDestroyImageBuffers (client)
|
||||||
{
|
{
|
||||||
REQUEST (xMbufDestroyImageBuffersReq);
|
REQUEST (xMbufDestroyImageBuffersReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
int rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xMbufDestroyImageBuffersReq);
|
REQUEST_SIZE_MATCH (xMbufDestroyImageBuffersReq);
|
||||||
if (!(pWin = LookupWindow (stuff->window, client)))
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
return BadWindow;
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
DestroyImageBuffers (pWin);
|
DestroyImageBuffers (pWin);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
@ -599,16 +600,16 @@ ProcSetMBufferAttributes (client)
|
||||||
REQUEST (xMbufSetMBufferAttributesReq);
|
REQUEST (xMbufSetMBufferAttributesReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
MultibuffersPtr pMultibuffers;
|
MultibuffersPtr pMultibuffers;
|
||||||
int len;
|
int len, rc;
|
||||||
Mask vmask;
|
Mask vmask;
|
||||||
Mask index2;
|
Mask index2;
|
||||||
CARD32 updateHint;
|
CARD32 updateHint;
|
||||||
XID *vlist;
|
XID *vlist;
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE (xMbufSetMBufferAttributesReq);
|
REQUEST_AT_LEAST_SIZE (xMbufSetMBufferAttributesReq);
|
||||||
pWin = LookupWindow (stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType);
|
pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType);
|
||||||
if (!pMultibuffers)
|
if (!pMultibuffers)
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
|
@ -655,12 +656,12 @@ ProcGetMBufferAttributes (client)
|
||||||
MultibuffersPtr pMultibuffers;
|
MultibuffersPtr pMultibuffers;
|
||||||
XID *ids;
|
XID *ids;
|
||||||
xMbufGetMBufferAttributesReply rep;
|
xMbufGetMBufferAttributesReply rep;
|
||||||
int i, n;
|
int i, n, rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xMbufGetMBufferAttributesReq);
|
REQUEST_SIZE_MATCH (xMbufGetMBufferAttributesReq);
|
||||||
pWin = LookupWindow (stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType);
|
pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType);
|
||||||
if (!pMultibuffers)
|
if (!pMultibuffers)
|
||||||
return BadAccess;
|
return BadAccess;
|
||||||
|
|
|
@ -958,12 +958,13 @@ ProcPanoramiXGetState(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetStateReq);
|
REQUEST(xPanoramiXGetStateReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xPanoramiXGetStateReply rep;
|
xPanoramiXGetStateReply rep;
|
||||||
register int n;
|
register int n, rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
||||||
pWin = LookupWindow (stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
|
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
|
@ -984,12 +985,13 @@ ProcPanoramiXGetScreenCount(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetScreenCountReq);
|
REQUEST(xPanoramiXGetScreenCountReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xPanoramiXGetScreenCountReply rep;
|
xPanoramiXGetScreenCountReply rep;
|
||||||
register int n;
|
register int n, rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||||
pWin = LookupWindow (stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
|
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
|
@ -1009,12 +1011,13 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetScreenSizeReq);
|
REQUEST(xPanoramiXGetScreenSizeReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xPanoramiXGetScreenSizeReply rep;
|
xPanoramiXGetScreenSizeReply rep;
|
||||||
register int n;
|
register int n, rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
||||||
pWin = LookupWindow (stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
|
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
|
|
52
Xext/shape.c
52
Xext/shape.c
|
@ -316,16 +316,16 @@ ProcShapeRectangles (client)
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
REQUEST(xShapeRectanglesReq);
|
REQUEST(xShapeRectanglesReq);
|
||||||
xRectangle *prects;
|
xRectangle *prects;
|
||||||
int nrects, ctype;
|
int nrects, ctype, rc;
|
||||||
RegionPtr srcRgn;
|
RegionPtr srcRgn;
|
||||||
RegionPtr *destRgn;
|
RegionPtr *destRgn;
|
||||||
CreateDftPtr createDefault;
|
CreateDftPtr createDefault;
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq);
|
REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq);
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
pWin = LookupWindow (stuff->dest, client);
|
rc = dixLookupWindow(&pWin, stuff->dest, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
switch (stuff->destKind) {
|
switch (stuff->destKind) {
|
||||||
case ShapeBounding:
|
case ShapeBounding:
|
||||||
createDefault = CreateBoundingShape;
|
createDefault = CreateBoundingShape;
|
||||||
|
@ -526,12 +526,13 @@ ProcShapeCombine (client)
|
||||||
CreateDftPtr createDefault;
|
CreateDftPtr createDefault;
|
||||||
CreateDftPtr createSrc;
|
CreateDftPtr createSrc;
|
||||||
RegionPtr tmp;
|
RegionPtr tmp;
|
||||||
|
int rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xShapeCombineReq);
|
REQUEST_SIZE_MATCH (xShapeCombineReq);
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
pDestWin = LookupWindow (stuff->dest, client);
|
rc = dixLookupWindow(&pDestWin, stuff->dest, client, DixUnknownAccess);
|
||||||
if (!pDestWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
if (!pDestWin->optional)
|
if (!pDestWin->optional)
|
||||||
MakeWindowOptional (pDestWin);
|
MakeWindowOptional (pDestWin);
|
||||||
switch (stuff->destKind) {
|
switch (stuff->destKind) {
|
||||||
|
@ -550,9 +551,9 @@ ProcShapeCombine (client)
|
||||||
}
|
}
|
||||||
pScreen = pDestWin->drawable.pScreen;
|
pScreen = pDestWin->drawable.pScreen;
|
||||||
|
|
||||||
pSrcWin = LookupWindow (stuff->src, client);
|
rc = dixLookupWindow(&pSrcWin, stuff->src, client, DixUnknownAccess);
|
||||||
if (!pSrcWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
switch (stuff->srcKind) {
|
switch (stuff->srcKind) {
|
||||||
case ShapeBounding:
|
case ShapeBounding:
|
||||||
srcRgn = wBoundingShape (pSrcWin);
|
srcRgn = wBoundingShape (pSrcWin);
|
||||||
|
@ -645,12 +646,13 @@ ProcShapeOffset (client)
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
REQUEST(xShapeOffsetReq);
|
REQUEST(xShapeOffsetReq);
|
||||||
RegionPtr srcRgn;
|
RegionPtr srcRgn;
|
||||||
|
int rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xShapeOffsetReq);
|
REQUEST_SIZE_MATCH (xShapeOffsetReq);
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
pWin = LookupWindow (stuff->dest, client);
|
rc = dixLookupWindow(&pWin, stuff->dest, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
switch (stuff->destKind) {
|
switch (stuff->destKind) {
|
||||||
case ShapeBounding:
|
case ShapeBounding:
|
||||||
srcRgn = wBoundingShape (pWin);
|
srcRgn = wBoundingShape (pWin);
|
||||||
|
@ -709,13 +711,13 @@ ProcShapeQueryExtents (client)
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xShapeQueryExtentsReply rep;
|
xShapeQueryExtentsReply rep;
|
||||||
BoxRec extents, *pExtents;
|
BoxRec extents, *pExtents;
|
||||||
register int n;
|
register int n, rc;
|
||||||
RegionPtr region;
|
RegionPtr region;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xShapeQueryExtentsReq);
|
REQUEST_SIZE_MATCH (xShapeQueryExtentsReq);
|
||||||
pWin = LookupWindow (stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
|
@ -990,14 +992,14 @@ ProcShapeInputSelected (client)
|
||||||
REQUEST(xShapeInputSelectedReq);
|
REQUEST(xShapeInputSelectedReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
ShapeEventPtr pShapeEvent, *pHead;
|
ShapeEventPtr pShapeEvent, *pHead;
|
||||||
int enabled;
|
int enabled, rc;
|
||||||
xShapeInputSelectedReply rep;
|
xShapeInputSelectedReply rep;
|
||||||
register int n;
|
register int n;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xShapeInputSelectedReq);
|
REQUEST_SIZE_MATCH (xShapeInputSelectedReq);
|
||||||
pWin = LookupWindow (stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
pHead = (ShapeEventPtr *) SecurityLookupIDByType(client,
|
pHead = (ShapeEventPtr *) SecurityLookupIDByType(client,
|
||||||
pWin->drawable.id, EventType, DixReadAccess);
|
pWin->drawable.id, EventType, DixReadAccess);
|
||||||
enabled = xFalse;
|
enabled = xFalse;
|
||||||
|
@ -1032,14 +1034,14 @@ ProcShapeGetRectangles (client)
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xShapeGetRectanglesReply rep;
|
xShapeGetRectanglesReply rep;
|
||||||
xRectangle *rects;
|
xRectangle *rects;
|
||||||
int nrects, i;
|
int nrects, i, rc;
|
||||||
RegionPtr region;
|
RegionPtr region;
|
||||||
register int n;
|
register int n;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xShapeGetRectanglesReq);
|
REQUEST_SIZE_MATCH(xShapeGetRectanglesReq);
|
||||||
pWin = LookupWindow (stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
switch (stuff->kind) {
|
switch (stuff->kind) {
|
||||||
case ShapeBounding:
|
case ShapeBounding:
|
||||||
region = wBoundingShape(pWin);
|
region = wBoundingShape(pWin);
|
||||||
|
|
19
Xext/xtest.c
19
Xext/xtest.c
|
@ -139,12 +139,12 @@ ProcXTestCompareCursor(client)
|
||||||
xXTestCompareCursorReply rep;
|
xXTestCompareCursorReply rep;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
CursorPtr pCursor;
|
CursorPtr pCursor;
|
||||||
register int n;
|
register int n, rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXTestCompareCursorReq);
|
REQUEST_SIZE_MATCH(xXTestCompareCursorReq);
|
||||||
pWin = (WindowPtr)LookupWindow(stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return(BadWindow);
|
return rc;
|
||||||
if (stuff->cursor == None)
|
if (stuff->cursor == None)
|
||||||
pCursor = NullCursor;
|
pCursor = NullCursor;
|
||||||
else if (stuff->cursor == XTestCurrentCursor)
|
else if (stuff->cursor == XTestCurrentCursor)
|
||||||
|
@ -173,12 +173,10 @@ ProcXTestFakeInput(client)
|
||||||
register ClientPtr client;
|
register ClientPtr client;
|
||||||
{
|
{
|
||||||
REQUEST(xXTestFakeInputReq);
|
REQUEST(xXTestFakeInputReq);
|
||||||
int nev;
|
int nev, n, type, rc;
|
||||||
int n;
|
|
||||||
xEvent *ev;
|
xEvent *ev;
|
||||||
DeviceIntPtr dev = NULL;
|
DeviceIntPtr dev = NULL;
|
||||||
WindowPtr root;
|
WindowPtr root;
|
||||||
int type;
|
|
||||||
#ifdef XINPUT
|
#ifdef XINPUT
|
||||||
Bool extension = FALSE;
|
Bool extension = FALSE;
|
||||||
deviceValuator *dv = NULL;
|
deviceValuator *dv = NULL;
|
||||||
|
@ -367,9 +365,10 @@ ProcXTestFakeInput(client)
|
||||||
root = GetCurrentRootWindow();
|
root = GetCurrentRootWindow();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
root = LookupWindow(ev->u.keyButtonPointer.root, client);
|
rc = dixLookupWindow(&root, ev->u.keyButtonPointer.root, client,
|
||||||
if (!root)
|
DixUnknownAccess);
|
||||||
return BadWindow;
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
if (root->parent)
|
if (root->parent)
|
||||||
{
|
{
|
||||||
client->errorValue = ev->u.keyButtonPointer.root;
|
client->errorValue = ev->u.keyButtonPointer.root;
|
||||||
|
|
|
@ -373,10 +373,8 @@ ProcXvQueryAdaptors(ClientPtr client)
|
||||||
xvFormat format;
|
xvFormat format;
|
||||||
xvAdaptorInfo ainfo;
|
xvAdaptorInfo ainfo;
|
||||||
xvQueryAdaptorsReply rep;
|
xvQueryAdaptorsReply rep;
|
||||||
int totalSize;
|
int totalSize, na, nf, rc;
|
||||||
int na;
|
|
||||||
XvAdaptorPtr pa;
|
XvAdaptorPtr pa;
|
||||||
int nf;
|
|
||||||
XvFormatPtr pf;
|
XvFormatPtr pf;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
@ -385,11 +383,9 @@ ProcXvQueryAdaptors(ClientPtr client)
|
||||||
REQUEST(xvQueryAdaptorsReq);
|
REQUEST(xvQueryAdaptorsReq);
|
||||||
REQUEST_SIZE_MATCH(xvQueryAdaptorsReq);
|
REQUEST_SIZE_MATCH(xvQueryAdaptorsReq);
|
||||||
|
|
||||||
if(!(pWin = (WindowPtr)LookupWindow(stuff->window, client) ))
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
{
|
if (rc != Success)
|
||||||
client->errorValue = stuff->window;
|
return rc;
|
||||||
return (BadWindow);
|
|
||||||
}
|
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
pxvs = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr;
|
pxvs = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr;
|
||||||
|
|
|
@ -106,7 +106,7 @@ SProcXChangeDeviceDontPropagateList(register ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcXChangeDeviceDontPropagateList(register ClientPtr client)
|
ProcXChangeDeviceDontPropagateList(register ClientPtr client)
|
||||||
{
|
{
|
||||||
int i;
|
int i, rc;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
struct tmask tmp[EMASKSIZE];
|
struct tmask tmp[EMASKSIZE];
|
||||||
OtherInputMasks *others;
|
OtherInputMasks *others;
|
||||||
|
@ -121,11 +121,10 @@ ProcXChangeDeviceDontPropagateList(register ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
pWin = (WindowPtr) LookupWindow(stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (!pWin) {
|
if (rc != Success) {
|
||||||
client->errorValue = stuff->window;
|
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
|
SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
|
||||||
BadWindow);
|
rc);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -505,6 +505,7 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode,
|
||||||
WindowPtr pWin, confineTo;
|
WindowPtr pWin, confineTo;
|
||||||
CursorPtr cursor;
|
CursorPtr cursor;
|
||||||
GrabPtr grab;
|
GrabPtr grab;
|
||||||
|
int rc;
|
||||||
|
|
||||||
if ((this_device_mode != GrabModeSync) &&
|
if ((this_device_mode != GrabModeSync) &&
|
||||||
(this_device_mode != GrabModeAsync)) {
|
(this_device_mode != GrabModeAsync)) {
|
||||||
|
@ -524,15 +525,15 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode,
|
||||||
client->errorValue = ownerEvents;
|
client->errorValue = ownerEvents;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
pWin = LookupWindow(grabWindow, client);
|
rc = dixLookupWindow(&pWin, grabWindow, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
if (rconfineTo == None)
|
if (rconfineTo == None)
|
||||||
confineTo = NullWindow;
|
confineTo = NullWindow;
|
||||||
else {
|
else {
|
||||||
confineTo = LookupWindow(rconfineTo, client);
|
rc = dixLookupWindow(&confineTo, rconfineTo, client, DixUnknownAccess);
|
||||||
if (!confineTo)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
}
|
}
|
||||||
if (rcursor == None)
|
if (rcursor == None)
|
||||||
cursor = NullCursor;
|
cursor = NullCursor;
|
||||||
|
@ -562,6 +563,7 @@ GrabKey(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode,
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
GrabPtr grab;
|
GrabPtr grab;
|
||||||
KeyClassPtr k = dev->key;
|
KeyClassPtr k = dev->key;
|
||||||
|
int rc;
|
||||||
|
|
||||||
if (k == NULL)
|
if (k == NULL)
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
|
@ -588,9 +590,9 @@ GrabKey(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode,
|
||||||
client->errorValue = ownerEvents;
|
client->errorValue = ownerEvents;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
pWin = LookupWindow(grabWindow, client);
|
rc = dixLookupWindow(&pWin, grabWindow, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
|
|
||||||
grab = CreateGrab(client->index, dev, pWin,
|
grab = CreateGrab(client->index, dev, pWin,
|
||||||
mask, ownerEvents, this_device_mode, other_devices_mode,
|
mask, ownerEvents, this_device_mode, other_devices_mode,
|
||||||
|
@ -810,7 +812,7 @@ SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate,
|
||||||
} else
|
} else
|
||||||
effectiveFocus = pWin = inputFocus;
|
effectiveFocus = pWin = inputFocus;
|
||||||
} else
|
} else
|
||||||
pWin = LookupWindow(dest, client);
|
dixLookupWindow(&pWin, dest, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (!pWin)
|
||||||
return BadWindow;
|
return BadWindow;
|
||||||
if ((propagate != xFalse) && (propagate != xTrue)) {
|
if ((propagate != xFalse) && (propagate != xTrue)) {
|
||||||
|
|
|
@ -100,7 +100,7 @@ int
|
||||||
ProcXGetDeviceDontPropagateList(register ClientPtr client)
|
ProcXGetDeviceDontPropagateList(register ClientPtr client)
|
||||||
{
|
{
|
||||||
CARD16 count = 0;
|
CARD16 count = 0;
|
||||||
int i;
|
int i, rc;
|
||||||
XEventClass *buf = NULL, *tbuf;
|
XEventClass *buf = NULL, *tbuf;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xGetDeviceDontPropagateListReply rep;
|
xGetDeviceDontPropagateListReply rep;
|
||||||
|
@ -115,11 +115,10 @@ ProcXGetDeviceDontPropagateList(register ClientPtr client)
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.count = 0;
|
rep.count = 0;
|
||||||
|
|
||||||
pWin = (WindowPtr) LookupWindow(stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (!pWin) {
|
if (rc != Success) {
|
||||||
client->errorValue = stuff->window;
|
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceDontPropagateList, 0,
|
SendErrorToClient(client, IReqCode, X_GetDeviceDontPropagateList, 0,
|
||||||
BadWindow);
|
rc);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,8 +98,7 @@ SProcXGetSelectedExtensionEvents(register ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcXGetSelectedExtensionEvents(register ClientPtr client)
|
ProcXGetSelectedExtensionEvents(register ClientPtr client)
|
||||||
{
|
{
|
||||||
int i;
|
int i, rc, total_length = 0;
|
||||||
int total_length = 0;
|
|
||||||
xGetSelectedExtensionEventsReply rep;
|
xGetSelectedExtensionEventsReply rep;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
XEventClass *buf = NULL;
|
XEventClass *buf = NULL;
|
||||||
|
@ -118,9 +117,10 @@ ProcXGetSelectedExtensionEvents(register ClientPtr client)
|
||||||
rep.this_client_count = 0;
|
rep.this_client_count = 0;
|
||||||
rep.all_clients_count = 0;
|
rep.all_clients_count = 0;
|
||||||
|
|
||||||
if (!(pWin = LookupWindow(stuff->window, client))) {
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
|
if (rc != Success) {
|
||||||
SendErrorToClient(client, IReqCode, X_GetSelectedExtensionEvents, 0,
|
SendErrorToClient(client, IReqCode, X_GetSelectedExtensionEvents, 0,
|
||||||
BadWindow);
|
rc);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -170,11 +170,9 @@ ProcXSelectExtensionEvent(register ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
pWin = (WindowPtr) LookupWindow(stuff->window, client);
|
ret = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (!pWin) {
|
if (ret != Success) {
|
||||||
client->errorValue = stuff->window;
|
SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, ret);
|
||||||
SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0,
|
|
||||||
BadWindow);
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,7 @@ ProcXUngrabDeviceButton(ClientPtr client)
|
||||||
DeviceIntPtr mdev;
|
DeviceIntPtr mdev;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
GrabRec temporaryGrab;
|
GrabRec temporaryGrab;
|
||||||
|
int rc;
|
||||||
|
|
||||||
REQUEST(xUngrabDeviceButtonReq);
|
REQUEST(xUngrabDeviceButtonReq);
|
||||||
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
|
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
|
||||||
|
@ -134,9 +135,9 @@ ProcXUngrabDeviceButton(ClientPtr client)
|
||||||
} else
|
} else
|
||||||
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
||||||
|
|
||||||
pWin = LookupWindow(stuff->grabWindow, client);
|
rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess);
|
||||||
if (!pWin) {
|
if (rc != Success) {
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadWindow);
|
SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, rc);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,7 @@ ProcXUngrabDeviceKey(ClientPtr client)
|
||||||
DeviceIntPtr mdev;
|
DeviceIntPtr mdev;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
GrabRec temporaryGrab;
|
GrabRec temporaryGrab;
|
||||||
|
int rc;
|
||||||
|
|
||||||
REQUEST(xUngrabDeviceKeyReq);
|
REQUEST(xUngrabDeviceKeyReq);
|
||||||
REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq);
|
REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq);
|
||||||
|
@ -133,9 +134,9 @@ ProcXUngrabDeviceKey(ClientPtr client)
|
||||||
} else
|
} else
|
||||||
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
||||||
|
|
||||||
pWin = LookupWindow(stuff->grabWindow, client);
|
rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess);
|
||||||
if (!pWin) {
|
if (rc != Success) {
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadWindow);
|
SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, rc);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
if (((stuff->key > dev->key->curKeySyms.maxKeyCode) ||
|
if (((stuff->key > dev->key->curKeySyms.maxKeyCode) ||
|
||||||
|
|
|
@ -93,10 +93,10 @@ typedef struct _compPixmapVisit {
|
||||||
static Bool
|
static Bool
|
||||||
compRepaintBorder (ClientPtr pClient, pointer closure)
|
compRepaintBorder (ClientPtr pClient, pointer closure)
|
||||||
{
|
{
|
||||||
WindowPtr pWindow = LookupWindow ((XID) closure, pClient);
|
WindowPtr pWindow;
|
||||||
|
int rc = dixLookupWindow(&pWindow, (XID)closure, pClient,DixUnknownAccess);
|
||||||
|
|
||||||
if (pWindow)
|
if (rc == Success) {
|
||||||
{
|
|
||||||
RegionRec exposed;
|
RegionRec exposed;
|
||||||
|
|
||||||
REGION_NULL(pScreen, &exposed);
|
REGION_NULL(pScreen, &exposed);
|
||||||
|
|
|
@ -170,12 +170,13 @@ static int ProcPseudoramiXGetState(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetStateReq);
|
REQUEST(xPanoramiXGetStateReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xPanoramiXGetStateReply rep;
|
xPanoramiXGetStateReply rep;
|
||||||
register int n;
|
register int n, rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
||||||
pWin = LookupWindow (stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
|
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
|
@ -196,12 +197,13 @@ static int ProcPseudoramiXGetScreenCount(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetScreenCountReq);
|
REQUEST(xPanoramiXGetScreenCountReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xPanoramiXGetScreenCountReply rep;
|
xPanoramiXGetScreenCountReply rep;
|
||||||
register int n;
|
register int n, rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||||
pWin = LookupWindow (stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
|
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
|
@ -222,12 +224,13 @@ static int ProcPseudoramiXGetScreenSize(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetScreenSizeReq);
|
REQUEST(xPanoramiXGetScreenSizeReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xPanoramiXGetScreenSizeReply rep;
|
xPanoramiXGetScreenSizeReply rep;
|
||||||
register int n;
|
register int n, rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
||||||
pWin = LookupWindow (stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (rc != Success)
|
||||||
return BadWindow;
|
return rc;
|
||||||
|
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
|
|
|
@ -116,14 +116,15 @@ ProcRRXineramaGetState(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetStateReq);
|
REQUEST(xPanoramiXGetStateReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xPanoramiXGetStateReply rep;
|
xPanoramiXGetStateReply rep;
|
||||||
register int n;
|
register int n, rc;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
rrScrPrivPtr pScrPriv;
|
rrScrPrivPtr pScrPriv;
|
||||||
Bool active = FALSE;
|
Bool active = FALSE;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
||||||
pWin = LookupWindow(stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if(!pWin) return BadWindow;
|
if(rc != Success)
|
||||||
|
return rc;
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
pScrPriv = rrGetScrPriv(pScreen);
|
pScrPriv = rrGetScrPriv(pScreen);
|
||||||
|
@ -180,11 +181,12 @@ ProcRRXineramaGetScreenCount(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetScreenCountReq);
|
REQUEST(xPanoramiXGetScreenCountReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xPanoramiXGetScreenCountReply rep;
|
xPanoramiXGetScreenCountReply rep;
|
||||||
register int n;
|
register int n, rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||||
pWin = LookupWindow(stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if(!pWin) return BadWindow;
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
|
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
|
@ -206,11 +208,12 @@ ProcRRXineramaGetScreenSize(ClientPtr client)
|
||||||
WindowPtr pWin, pRoot;
|
WindowPtr pWin, pRoot;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
xPanoramiXGetScreenSizeReply rep;
|
xPanoramiXGetScreenSizeReply rep;
|
||||||
register int n;
|
register int n, rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
||||||
pWin = LookupWindow (stuff->window, client);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if(!pWin) return BadWindow;
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
pRoot = WindowTable[pScreen->myNum];
|
pRoot = WindowTable[pScreen->myNum];
|
||||||
|
|
Loading…
Reference in New Issue