aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/dix')
-rw-r--r--nx-X11/programs/Xserver/dix/dispatch.c42
-rw-r--r--nx-X11/programs/Xserver/dix/dixutils.c45
2 files changed, 5 insertions, 82 deletions
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c
index 02d5170fb..044ba1c4b 100644
--- a/nx-X11/programs/Xserver/dix/dispatch.c
+++ b/nx-X11/programs/Xserver/dix/dispatch.c
@@ -216,33 +216,6 @@ InitSelections()
}
#endif /* NXAGENT_SERVER */
-void
-FlushClientCaches(XID id)
-{
- int i;
- register ClientPtr client;
-
- client = clients[CLIENT_ID(id)];
- if (client == NullClient)
- return ;
- for (i=0; i<currentMaxClients; i++)
- {
- client = clients[i];
- if (client != NullClient)
- {
- if (client->lastDrawableID == id)
- {
- client->lastDrawableID = screenInfo.screens[0]->root->drawable.id;
- client->lastDrawable = (DrawablePtr)screenInfo.screens[0]->root;
- }
- else if (client->lastGCID == id)
- {
- client->lastGCID = INVALID;
- client->lastGC = (GCPtr)NULL;
- }
- }
- }
-}
#undef SMART_DEBUG
#define SMART_SCHEDULE_DEFAULT_INTERVAL 20 /* ms */
@@ -3629,20 +3602,7 @@ void InitClient(ClientPtr client, int i, void * ospriv)
client->sequence = 0;
client->clientAsMask = ((Mask)i) << CLIENTOFFSET;
client->clientGone = FALSE;
- if (i)
- {
- client->closeDownMode = DestroyAll;
- client->lastDrawable = (DrawablePtr)screenInfo.screens[0]->root;
- client->lastDrawableID = screenInfo.screens[0]->root->drawable.id;
- }
- else
- {
- client->closeDownMode = RetainPermanent;
- client->lastDrawable = (DrawablePtr)NULL;
- client->lastDrawableID = INVALID;
- }
- client->lastGC = (GCPtr) NULL;
- client->lastGCID = INVALID;
+ client->closeDownMode = i ? DestroyAll : RetainPermanent;
client->numSaved = 0;
client->saveSet = (SaveSetElt *)NULL;
client->noClientException = Success;
diff --git a/nx-X11/programs/Xserver/dix/dixutils.c b/nx-X11/programs/Xserver/dix/dixutils.c
index bf925f748..3ccc90d71 100644
--- a/nx-X11/programs/Xserver/dix/dixutils.c
+++ b/nx-X11/programs/Xserver/dix/dixutils.c
@@ -210,27 +210,10 @@ CompareISOLatin1Lowered(unsigned char *s1, int s1len,
WindowPtr
SecurityLookupWindow(XID rid, ClientPtr client, Mask access_mode)
{
- WindowPtr pWin;
-
client->errorValue = rid;
if(rid == INVALID)
return NULL;
- if (client->trustLevel != XSecurityClientTrusted)
- return (WindowPtr)SecurityLookupIDByType(client, rid, RT_WINDOW, access_mode);
- if (client->lastDrawableID == rid)
- {
- if (client->lastDrawable->type == DRAWABLE_WINDOW)
- return ((WindowPtr) client->lastDrawable);
- return (WindowPtr) NULL;
- }
- pWin = (WindowPtr)SecurityLookupIDByType(client, rid, RT_WINDOW, access_mode);
- if (pWin && pWin->drawable.type == DRAWABLE_WINDOW) {
- client->lastDrawable = (DrawablePtr) pWin;
- client->lastDrawableID = rid;
- client->lastGCID = INVALID;
- client->lastGC = (GCPtr)NULL;
- }
- return pWin;
+ return (WindowPtr)SecurityLookupIDByType(client, rid, RT_WINDOW, access_mode);
}
@@ -241,15 +224,10 @@ SecurityLookupDrawable(XID rid, ClientPtr client, Mask access_mode)
if(rid == INVALID)
return (void *) NULL;
- if (client->trustLevel != XSecurityClientTrusted)
- return (DrawablePtr)SecurityLookupIDByClass(client, rid, RC_DRAWABLE,
- access_mode);
- if (client->lastDrawableID == rid)
- return ((void *) client->lastDrawable);
pDraw = (DrawablePtr)SecurityLookupIDByClass(client, rid, RC_DRAWABLE,
access_mode);
- if (pDraw && (pDraw->type != UNDRAWABLE_WINDOW))
- return (void *)pDraw;
+ if ((client->trustLevel != XSecurityClientTrusted) || (pDraw && (pDraw->type != UNDRAWABLE_WINDOW)))
+ return (void *)pDraw;
return (void *)NULL;
}
@@ -279,20 +257,7 @@ LookupWindow(XID rid, ClientPtr client)
client->errorValue = rid;
if(rid == INVALID)
return NULL;
- if (client->lastDrawableID == rid)
- {
- if (client->lastDrawable->type == DRAWABLE_WINDOW)
- return ((WindowPtr) client->lastDrawable);
- return (WindowPtr) NULL;
- }
- pWin = (WindowPtr)LookupIDByType(rid, RT_WINDOW);
- if (pWin && pWin->drawable.type == DRAWABLE_WINDOW) {
- client->lastDrawable = (DrawablePtr) pWin;
- client->lastDrawableID = rid;
- client->lastGCID = INVALID;
- client->lastGC = (GCPtr)NULL;
- }
- return pWin;
+ return (WindowPtr)LookupIDByType(rid, RT_WINDOW);
}
@@ -303,8 +268,6 @@ LookupDrawable(XID rid, ClientPtr client)
if(rid == INVALID)
return (void *) NULL;
- if (client->lastDrawableID == rid)
- return ((void *) client->lastDrawable);
pDraw = (DrawablePtr)LookupIDByClass(rid, RC_DRAWABLE);
if (pDraw && (pDraw->type != UNDRAWABLE_WINDOW))
return (void *)pDraw;