aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/include
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-02-24 12:23:51 +0100
committerMihai Moldovan <ionic@ionic.de>2017-02-24 12:23:51 +0100
commit31426a3d27ffccacfcd8b0130b65b39a8c9a5522 (patch)
treed24fcf630f3e50c8c12fe3bbfe7b16e4ced02f6e /nx-X11/programs/Xserver/include
parent3c322ffbb911b70415c47cb8ba1c3559241819f6 (diff)
parent3d8575c2114ed98e525c422bba88e04f0af7f029 (diff)
downloadnx-libs-31426a3d27ffccacfcd8b0130b65b39a8c9a5522.tar.gz
nx-libs-31426a3d27ffccacfcd8b0130b65b39a8c9a5522.tar.bz2
nx-libs-31426a3d27ffccacfcd8b0130b65b39a8c9a5522.zip
Merge branch 'uli42-fix_#306_#322' into 3.6.x
Attributes GH PR #338: https://github.com/ArcticaProject/nx-libs/pull/338
Diffstat (limited to 'nx-X11/programs/Xserver/include')
-rw-r--r--nx-X11/programs/Xserver/include/dix.h38
-rw-r--r--nx-X11/programs/Xserver/include/dixstruct.h4
-rw-r--r--nx-X11/programs/Xserver/include/resource.h6
3 files changed, 6 insertions, 42 deletions
diff --git a/nx-X11/programs/Xserver/include/dix.h b/nx-X11/programs/Xserver/include/dix.h
index 0b08b46a9..58f6c6eb0 100644
--- a/nx-X11/programs/Xserver/include/dix.h
+++ b/nx-X11/programs/Xserver/include/dix.h
@@ -91,15 +91,11 @@ SOFTWARE.
/* XXX if you are using this macro, you are probably not generating Match
* errors where appropriate */
#define LOOKUP_DRAWABLE(did, client)\
- ((client->lastDrawableID == did) ? \
- client->lastDrawable : (DrawablePtr)LookupDrawable(did, client))
+ ((DrawablePtr)LookupDrawable(did, client))
#ifdef XCSECURITY
#define SECURITY_VERIFY_DRAWABLE(pDraw, did, client, mode)\
- if (client->lastDrawableID == did && !client->trustLevel)\
- pDraw = client->lastDrawable;\
- else \
{\
pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \
RC_DRAWABLE, mode);\
@@ -113,9 +109,6 @@ SOFTWARE.
}
#define SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, mode)\
- if (client->lastDrawableID == did && !client->trustLevel)\
- pDraw = client->lastDrawable;\
- else \
{\
pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \
RC_DRAWABLE, mode);\
@@ -127,10 +120,7 @@ SOFTWARE.
}
#define SECURITY_VERIFY_GC(pGC, rid, client, mode)\
- if (client->lastGCID == rid && !client->trustLevel)\
- pGC = client->lastGC;\
- else\
- pGC = (GC *) SecurityLookupIDByType(client, rid, RT_GC, mode);\
+ pGC = (GC *) SecurityLookupIDByType(client, rid, RT_GC, mode);\
if (!pGC)\
{\
client->errorValue = rid;\
@@ -149,9 +139,6 @@ SOFTWARE.
#else /* not XCSECURITY */
#define VERIFY_DRAWABLE(pDraw, did, client)\
- if (client->lastDrawableID == did)\
- pDraw = client->lastDrawable;\
- else \
{\
pDraw = (DrawablePtr) LookupIDByClass(did, RC_DRAWABLE);\
if (!pDraw) \
@@ -164,9 +151,6 @@ SOFTWARE.
}
#define VERIFY_GEOMETRABLE(pDraw, did, client)\
- if (client->lastDrawableID == did)\
- pDraw = client->lastDrawable;\
- else \
{\
pDraw = (DrawablePtr) LookupIDByClass(did, RC_DRAWABLE);\
if (!pDraw) \
@@ -177,10 +161,7 @@ SOFTWARE.
}
#define VERIFY_GC(pGC, rid, client)\
- if (client->lastGCID == rid)\
- pGC = client->lastGC;\
- else\
- pGC = (GC *)LookupIDByType(rid, RT_GC);\
+ pGC = (GC *)LookupIDByType(rid, RT_GC);\
if (!pGC)\
{\
client->errorValue = rid;\
@@ -252,23 +233,12 @@ SOFTWARE.
#endif /* NEED_DBE_BUF_BITS */
#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, pGC, client)\
- if ((stuff->gc == INVALID) || (client->lastGCID != stuff->gc) ||\
- (client->lastDrawableID != drawID))\
{\
SECURITY_VERIFY_GEOMETRABLE(pDraw, drawID, client, DixWriteAccess);\
SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixReadAccess);\
if ((pGC->depth != pDraw->depth) ||\
(pGC->pScreen != pDraw->pScreen))\
return (BadMatch);\
- client->lastDrawable = pDraw;\
- client->lastDrawableID = drawID;\
- client->lastGC = pGC;\
- client->lastGCID = stuff->gc;\
- }\
- else\
- {\
- pGC = client->lastGC;\
- pDraw = client->lastDrawable;\
}\
SET_DBE_DSTBUF(pDraw, drawID);\
if (pGC->serialNumber != pDraw->serialNumber)\
@@ -325,8 +295,6 @@ extern void UpdateCurrentTimeIf(void);
extern void InitSelections(void);
-extern void FlushClientCaches(XID /*id*/);
-
extern int dixDestroyPixmap(
void * /*value*/,
XID /*pid*/);
diff --git a/nx-X11/programs/Xserver/include/dixstruct.h b/nx-X11/programs/Xserver/include/dixstruct.h
index ca50c7ca7..3c97e5bb7 100644
--- a/nx-X11/programs/Xserver/include/dixstruct.h
+++ b/nx-X11/programs/Xserver/include/dixstruct.h
@@ -101,10 +101,6 @@ typedef struct _Client {
int clientGone;
int noClientException; /* this client died or needs to be
* killed */
- DrawablePtr lastDrawable;
- Drawable lastDrawableID;
- GCPtr lastGC;
- GContext lastGCID;
SaveSetElt *saveSet;
int numSaved;
void *screenPrivate[MAXSCREENS];
diff --git a/nx-X11/programs/Xserver/include/resource.h b/nx-X11/programs/Xserver/include/resource.h
index 164e7ccfc..30ae624fb 100644
--- a/nx-X11/programs/Xserver/include/resource.h
+++ b/nx-X11/programs/Xserver/include/resource.h
@@ -71,9 +71,9 @@ typedef unsigned long RESTYPE;
/* types for Resource routines */
-#define RT_WINDOW ((RESTYPE)1|RC_CACHED|RC_DRAWABLE)
-#define RT_PIXMAP ((RESTYPE)2|RC_CACHED|RC_DRAWABLE)
-#define RT_GC ((RESTYPE)3|RC_CACHED)
+#define RT_WINDOW ((RESTYPE)1|RC_DRAWABLE)
+#define RT_PIXMAP ((RESTYPE)2|RC_DRAWABLE)
+#define RT_GC ((RESTYPE)3)
#undef RT_FONT
#undef RT_CURSOR
#define RT_FONT ((RESTYPE)4)