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) ...@@ -238,12 +238,21 @@ ProcXFixesSelectCursorInput (ClientPtr client)
{ {
REQUEST (xXFixesSelectCursorInputReq); REQUEST (xXFixesSelectCursorInputReq);
WindowPtr pWin; WindowPtr pWin;
#ifndef NXAGENT_SERVER
int rc;
#endif
REQUEST_SIZE_MATCH (xXFixesSelectCursorInputReq); 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, pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
DixReadAccess); DixReadAccess);
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
#endif
if (stuff->eventMask & ~CursorAllEvents) if (stuff->eventMask & ~CursorAllEvents)
{ {
client->errorValue = stuff->eventMask; client->errorValue = stuff->eventMask;
......
...@@ -217,12 +217,21 @@ ProcXFixesCreateRegionFromGC (ClientPtr client) ...@@ -217,12 +217,21 @@ ProcXFixesCreateRegionFromGC (ClientPtr client)
{ {
RegionPtr pRegion, pClip; RegionPtr pRegion, pClip;
GCPtr pGC; GCPtr pGC;
#ifndef NXAGENT_SERVER
int rc;
#endif
REQUEST (xXFixesCreateRegionFromGCReq); REQUEST (xXFixesCreateRegionFromGCReq);
REQUEST_SIZE_MATCH (xXFixesCreateRegionFromGCReq); REQUEST_SIZE_MATCH (xXFixesCreateRegionFromGCReq);
LEGAL_NEW_RESOURCE (stuff->region, client); 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); SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixReadAccess);
#endif
switch (pGC->clientClipType) { switch (pGC->clientClipType) {
case CT_PIXMAP: case CT_PIXMAP:
...@@ -615,10 +624,20 @@ ProcXFixesSetGCClipRegion (ClientPtr client) ...@@ -615,10 +624,20 @@ ProcXFixesSetGCClipRegion (ClientPtr client)
GCPtr pGC; GCPtr pGC;
RegionPtr pRegion; RegionPtr pRegion;
XID vals[2]; XID vals[2];
#ifndef NXAGENT_SERVER
int rc;
#endif
REQUEST(xXFixesSetGCClipRegionReq); REQUEST(xXFixesSetGCClipRegionReq);
REQUEST_SIZE_MATCH(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); SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixWriteAccess);
#endif
VERIFY_REGION_OR_NONE (pRegion, stuff->region, client, DixReadAccess); VERIFY_REGION_OR_NONE (pRegion, stuff->region, client, DixReadAccess);
if (pRegion) if (pRegion)
......
...@@ -37,10 +37,16 @@ ProcXFixesChangeSaveSet(ClientPtr client) ...@@ -37,10 +37,16 @@ ProcXFixesChangeSaveSet(ClientPtr client)
REQUEST(xXFixesChangeSaveSetReq); REQUEST(xXFixesChangeSaveSetReq);
REQUEST_SIZE_MATCH(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, pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
DixReadAccess); DixReadAccess);
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
#endif
if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id))) if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id)))
return BadMatch; return BadMatch;
if ((stuff->mode != SetModeInsert) && (stuff->mode != SetModeDelete)) if ((stuff->mode != SetModeInsert) && (stuff->mode != SetModeDelete))
......
...@@ -195,12 +195,21 @@ ProcXFixesSelectSelectionInput (ClientPtr client) ...@@ -195,12 +195,21 @@ ProcXFixesSelectSelectionInput (ClientPtr client)
{ {
REQUEST (xXFixesSelectSelectionInputReq); REQUEST (xXFixesSelectSelectionInputReq);
WindowPtr pWin; WindowPtr pWin;
#ifndef NXAGENT_SERVER
int rc;
#endif
REQUEST_SIZE_MATCH (xXFixesSelectSelectionInputReq); 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, pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
DixReadAccess); DixReadAccess);
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
#endif
if (stuff->eventMask & ~SelectionAllEvents) if (stuff->eventMask & ~SelectionAllEvents)
{ {
client->errorValue = stuff->eventMask; client->errorValue = stuff->eventMask;
......
...@@ -49,10 +49,10 @@ ...@@ -49,10 +49,10 @@
#include "xfixesint.h" #include "xfixesint.h"
#include "protocol-versions.h" #include "protocol-versions.h"
unsigned char XFixesReqCode; static unsigned char XFixesReqCode;
int XFixesEventBase; int XFixesEventBase;
int XFixesErrorBase; int XFixesErrorBase;
int XFixesClientPrivateIndex; static int XFixesClientPrivateIndex;
static int static int
ProcXFixesQueryVersion(ClientPtr client) ProcXFixesQueryVersion(ClientPtr client)
...@@ -162,7 +162,7 @@ SProcXFixesQueryVersion(ClientPtr client) ...@@ -162,7 +162,7 @@ SProcXFixesQueryVersion(ClientPtr client)
return (*ProcXFixesVector[stuff->xfixesReqType]) (client); return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
} }
int (*SProcXFixesVector[XFixesNumberRequests])(ClientPtr) = { static int (*SProcXFixesVector[XFixesNumberRequests])(ClientPtr) = {
/*************** Version 1 ******************/ /*************** Version 1 ******************/
SProcXFixesQueryVersion, SProcXFixesQueryVersion,
SProcXFixesChangeSaveSet, SProcXFixesChangeSaveSet,
......
...@@ -60,9 +60,7 @@ ...@@ -60,9 +60,7 @@
#include "selection.h" #include "selection.h"
#include "xfixes.h" #include "xfixes.h"
extern unsigned char XFixesReqCode;
extern int XFixesEventBase; extern int XFixesEventBase;
extern int XFixesClientPrivateIndex;
typedef struct _XFixesClient { typedef struct _XFixesClient {
CARD32 major_version; CARD32 major_version;
...@@ -72,7 +70,6 @@ typedef struct _XFixesClient { ...@@ -72,7 +70,6 @@ typedef struct _XFixesClient {
#define GetXFixesClient(pClient) ((XFixesClientPtr) (pClient)->devPrivates[XFixesClientPrivateIndex].ptr) #define GetXFixesClient(pClient) ((XFixesClientPtr) (pClient)->devPrivates[XFixesClientPrivateIndex].ptr)
extern int (*ProcXFixesVector[XFixesNumberRequests])(ClientPtr); extern int (*ProcXFixesVector[XFixesNumberRequests])(ClientPtr);
extern int (*SProcXFixesVector[XFixesNumberRequests])(ClientPtr);
/* Initialize extension at server startup time */ /* 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