Commit d59e8d7f authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mihai Moldovan

Lift XFIXES to xorg-xserver-1.4.2 state

parent 5706005f
......@@ -238,12 +238,21 @@ ProcXFixesSelectCursorInput (ClientPtr client)
{
REQUEST (xXFixesSelectCursorInputReq);
WindowPtr pWin;
#ifndef NXAGENT_SERVER
int rc;
#endif
REQUEST_SIZE_MATCH (xXFixesSelectCursorInputReq);
#ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
if (rc != Success)
return rc;
#else
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
DixReadAccess);
if (!pWin)
return(BadWindow);
#endif
if (stuff->eventMask & ~CursorAllEvents)
{
client->errorValue = stuff->eventMask;
......
......@@ -217,12 +217,21 @@ ProcXFixesCreateRegionFromGC (ClientPtr client)
{
RegionPtr pRegion, pClip;
GCPtr pGC;
#ifndef NXAGENT_SERVER
int rc;
#endif
REQUEST (xXFixesCreateRegionFromGCReq);
REQUEST_SIZE_MATCH (xXFixesCreateRegionFromGCReq);
LEGAL_NEW_RESOURCE (stuff->region, client);
#ifndef NXAGENT_SERVER
rc = dixLookupGC(&pGC, stuff->gc, client, DixReadAccess);
if (rc != Success)
return rc;
#else
SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixReadAccess);
#endif
switch (pGC->clientClipType) {
case CT_PIXMAP:
......@@ -615,10 +624,20 @@ ProcXFixesSetGCClipRegion (ClientPtr client)
GCPtr pGC;
RegionPtr pRegion;
XID vals[2];
#ifndef NXAGENT_SERVER
int rc;
#endif
REQUEST(xXFixesSetGCClipRegionReq);
REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq);
#ifndef NXAGENT_SERVER
rc = dixLookupGC(&pGC, stuff->gc, client, DixWriteAccess);
if (rc != Success)
return rc;
#else
SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixWriteAccess);
#endif
VERIFY_REGION_OR_NONE (pRegion, stuff->region, client, DixReadAccess);
if (pRegion)
......
......@@ -37,10 +37,16 @@ ProcXFixesChangeSaveSet(ClientPtr client)
REQUEST(xXFixesChangeSaveSetReq);
REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq);
#ifndef NXAGENT_SERVER
result = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
if (result != Success)
return result;
#else
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
DixReadAccess);
if (!pWin)
return(BadWindow);
#endif
if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id)))
return BadMatch;
if ((stuff->mode != SetModeInsert) && (stuff->mode != SetModeDelete))
......
......@@ -195,12 +195,21 @@ ProcXFixesSelectSelectionInput (ClientPtr client)
{
REQUEST (xXFixesSelectSelectionInputReq);
WindowPtr pWin;
#ifndef NXAGENT_SERVER
int rc;
#endif
REQUEST_SIZE_MATCH (xXFixesSelectSelectionInputReq);
#ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
if (rc != Success)
return rc;
#else
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
DixReadAccess);
if (!pWin)
return(BadWindow);
#endif
if (stuff->eventMask & ~SelectionAllEvents)
{
client->errorValue = stuff->eventMask;
......
......@@ -49,10 +49,10 @@
#include "xfixesint.h"
#include "protocol-versions.h"
unsigned char XFixesReqCode;
static unsigned char XFixesReqCode;
int XFixesEventBase;
int XFixesErrorBase;
int XFixesClientPrivateIndex;
static int XFixesClientPrivateIndex;
static int
ProcXFixesQueryVersion(ClientPtr client)
......@@ -162,7 +162,7 @@ SProcXFixesQueryVersion(ClientPtr client)
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
}
int (*SProcXFixesVector[XFixesNumberRequests])(ClientPtr) = {
static int (*SProcXFixesVector[XFixesNumberRequests])(ClientPtr) = {
/*************** Version 1 ******************/
SProcXFixesQueryVersion,
SProcXFixesChangeSaveSet,
......
......@@ -60,9 +60,7 @@
#include "selection.h"
#include "xfixes.h"
extern unsigned char XFixesReqCode;
extern int XFixesEventBase;
extern int XFixesClientPrivateIndex;
typedef struct _XFixesClient {
CARD32 major_version;
......@@ -72,7 +70,6 @@ typedef struct _XFixesClient {
#define GetXFixesClient(pClient) ((XFixesClientPtr) (pClient)->devPrivates[XFixesClientPrivateIndex].ptr)
extern int (*ProcXFixesVector[XFixesNumberRequests])(ClientPtr);
extern int (*SProcXFixesVector[XFixesNumberRequests])(ClientPtr);
/* Initialize extension at server startup time */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment