diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2017-11-05 23:59:22 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2018-02-26 02:54:13 +0100 |
commit | d59e8d7f43d8a39155cb4d1884cf65b871fd3de6 (patch) | |
tree | 91e169bd6be9f5480cbf1a4ffcf8d85ecf6efa95 /nx-X11 | |
parent | 5706005f72d79716fadaabdb6d560bfeb30ff6df (diff) | |
download | nx-libs-d59e8d7f43d8a39155cb4d1884cf65b871fd3de6.tar.gz nx-libs-d59e8d7f43d8a39155cb4d1884cf65b871fd3de6.tar.bz2 nx-libs-d59e8d7f43d8a39155cb4d1884cf65b871fd3de6.zip |
Lift XFIXES to xorg-xserver-1.4.2 state
Diffstat (limited to 'nx-X11')
-rw-r--r-- | nx-X11/programs/Xserver/xfixes/cursor.c | 9 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/xfixes/region.c | 19 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/xfixes/saveset.c | 6 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/xfixes/select.c | 9 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/xfixes/xfixes.c | 6 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/xfixes/xfixesint.h | 3 |
6 files changed, 46 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/xfixes/cursor.c b/nx-X11/programs/Xserver/xfixes/cursor.c index d372b476e..12efbd75f 100644 --- a/nx-X11/programs/Xserver/xfixes/cursor.c +++ b/nx-X11/programs/Xserver/xfixes/cursor.c @@ -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; diff --git a/nx-X11/programs/Xserver/xfixes/region.c b/nx-X11/programs/Xserver/xfixes/region.c index 4abe9083d..9ac1fae3f 100644 --- a/nx-X11/programs/Xserver/xfixes/region.c +++ b/nx-X11/programs/Xserver/xfixes/region.c @@ -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) diff --git a/nx-X11/programs/Xserver/xfixes/saveset.c b/nx-X11/programs/Xserver/xfixes/saveset.c index a992ab306..57d9afc2e 100644 --- a/nx-X11/programs/Xserver/xfixes/saveset.c +++ b/nx-X11/programs/Xserver/xfixes/saveset.c @@ -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)) diff --git a/nx-X11/programs/Xserver/xfixes/select.c b/nx-X11/programs/Xserver/xfixes/select.c index 98c71020d..f05c72c2e 100644 --- a/nx-X11/programs/Xserver/xfixes/select.c +++ b/nx-X11/programs/Xserver/xfixes/select.c @@ -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; diff --git a/nx-X11/programs/Xserver/xfixes/xfixes.c b/nx-X11/programs/Xserver/xfixes/xfixes.c index c4977b634..7447c5873 100644 --- a/nx-X11/programs/Xserver/xfixes/xfixes.c +++ b/nx-X11/programs/Xserver/xfixes/xfixes.c @@ -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, diff --git a/nx-X11/programs/Xserver/xfixes/xfixesint.h b/nx-X11/programs/Xserver/xfixes/xfixesint.h index 2e1ac143e..17f0dbeac 100644 --- a/nx-X11/programs/Xserver/xfixes/xfixesint.h +++ b/nx-X11/programs/Xserver/xfixes/xfixesint.h @@ -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 */ |