mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-22 20:35:43 +00:00
Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver
This commit is contained in:
commit
2d0a63126b
104 changed files with 2536 additions and 1654 deletions
|
|
@ -7,7 +7,7 @@ sdk_HEADERS = \
|
|||
closure.h \
|
||||
colormap.h \
|
||||
colormapst.h \
|
||||
config.h \
|
||||
hotplug.h \
|
||||
cursor.h \
|
||||
cursorstr.h \
|
||||
dix.h \
|
||||
|
|
|
|||
182
include/dix.h
182
include/dix.h
|
|
@ -81,107 +81,6 @@ SOFTWARE.
|
|||
return(BadIDChoice);\
|
||||
}
|
||||
|
||||
/* 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))
|
||||
|
||||
#ifdef XACE
|
||||
|
||||
#define SECURITY_VERIFY_DRAWABLE(pDraw, did, client, mode)\
|
||||
{\
|
||||
pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \
|
||||
RC_DRAWABLE, mode);\
|
||||
if (!pDraw) \
|
||||
{\
|
||||
client->errorValue = did; \
|
||||
return BadDrawable;\
|
||||
}\
|
||||
if (pDraw->type == UNDRAWABLE_WINDOW)\
|
||||
return BadMatch;\
|
||||
}
|
||||
|
||||
#define SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, mode)\
|
||||
{\
|
||||
pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \
|
||||
RC_DRAWABLE, mode);\
|
||||
if (!pDraw) \
|
||||
{\
|
||||
client->errorValue = did; \
|
||||
return BadDrawable;\
|
||||
}\
|
||||
}
|
||||
|
||||
#define SECURITY_VERIFY_GC(pGC, rid, client, mode)\
|
||||
pGC = (GC *) SecurityLookupIDByType(client, rid, RT_GC, mode);\
|
||||
if (!pGC)\
|
||||
{\
|
||||
client->errorValue = rid;\
|
||||
return (BadGC);\
|
||||
}
|
||||
|
||||
#define VERIFY_DRAWABLE(pDraw, did, client)\
|
||||
SECURITY_VERIFY_DRAWABLE(pDraw, did, client, SecurityUnknownAccess)
|
||||
|
||||
#define VERIFY_GEOMETRABLE(pDraw, did, client)\
|
||||
SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, SecurityUnknownAccess)
|
||||
|
||||
#define VERIFY_GC(pGC, rid, client)\
|
||||
SECURITY_VERIFY_GC(pGC, rid, client, SecurityUnknownAccess)
|
||||
|
||||
#else /* not XACE */
|
||||
|
||||
#define VERIFY_DRAWABLE(pDraw, did, client)\
|
||||
if (client->lastDrawableID == did)\
|
||||
pDraw = client->lastDrawable;\
|
||||
else \
|
||||
{\
|
||||
pDraw = (DrawablePtr) LookupIDByClass(did, RC_DRAWABLE);\
|
||||
if (!pDraw) \
|
||||
{\
|
||||
client->errorValue = did; \
|
||||
return BadDrawable;\
|
||||
}\
|
||||
if (pDraw->type == UNDRAWABLE_WINDOW)\
|
||||
return BadMatch;\
|
||||
}
|
||||
|
||||
#define VERIFY_GEOMETRABLE(pDraw, did, client)\
|
||||
if (client->lastDrawableID == did)\
|
||||
pDraw = client->lastDrawable;\
|
||||
else \
|
||||
{\
|
||||
pDraw = (DrawablePtr) LookupIDByClass(did, RC_DRAWABLE);\
|
||||
if (!pDraw) \
|
||||
{\
|
||||
client->errorValue = did; \
|
||||
return BadDrawable;\
|
||||
}\
|
||||
}
|
||||
|
||||
#define VERIFY_GC(pGC, rid, client)\
|
||||
if (client->lastGCID == rid)\
|
||||
pGC = client->lastGC;\
|
||||
else\
|
||||
pGC = (GC *)LookupIDByType(rid, RT_GC);\
|
||||
if (!pGC)\
|
||||
{\
|
||||
client->errorValue = rid;\
|
||||
return (BadGC);\
|
||||
}
|
||||
|
||||
#define SECURITY_VERIFY_DRAWABLE(pDraw, did, client, mode)\
|
||||
VERIFY_DRAWABLE(pDraw, did, client)
|
||||
|
||||
#define SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, mode)\
|
||||
VERIFY_GEOMETRABLE(pDraw, did, client)
|
||||
|
||||
#define SECURITY_VERIFY_GC(pGC, rid, client, mode)\
|
||||
VERIFY_GC(pGC, rid, client)
|
||||
|
||||
#endif /* XACE */
|
||||
|
||||
/*
|
||||
* We think that most hardware implementations of DBE will want
|
||||
* LookupID*(dbe_back_buffer_id) to return the window structure that the
|
||||
|
|
@ -239,10 +138,15 @@ SOFTWARE.
|
|||
if ((stuff->gc == INVALID) || (client->lastGCID != stuff->gc) ||\
|
||||
(client->lastDrawableID != drawID))\
|
||||
{\
|
||||
SECURITY_VERIFY_GEOMETRABLE(pDraw, drawID, client, SecurityWriteAccess);\
|
||||
SECURITY_VERIFY_GC(pGC, stuff->gc, client, SecurityReadAccess);\
|
||||
if ((pGC->depth != pDraw->depth) ||\
|
||||
(pGC->pScreen != pDraw->pScreen))\
|
||||
int rc;\
|
||||
rc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY,\
|
||||
DixWriteAccess);\
|
||||
if (rc != Success)\
|
||||
return rc;\
|
||||
rc = dixLookupGC(&(pGC), stuff->gc, client, DixReadAccess);\
|
||||
if (rc != Success)\
|
||||
return rc;\
|
||||
if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
|
||||
return (BadMatch);\
|
||||
client->lastDrawable = pDraw;\
|
||||
client->lastDrawableID = drawID;\
|
||||
|
|
@ -375,47 +279,41 @@ extern int CompareISOLatin1Lowered(
|
|||
unsigned char * /*b*/,
|
||||
int blen);
|
||||
|
||||
#ifdef XACE
|
||||
extern int dixLookupWindow(
|
||||
WindowPtr *result,
|
||||
XID id,
|
||||
ClientPtr client,
|
||||
Mask access_mode);
|
||||
|
||||
extern WindowPtr SecurityLookupWindow(
|
||||
XID /*rid*/,
|
||||
ClientPtr /*client*/,
|
||||
Mask /*access_mode*/);
|
||||
extern int dixLookupDrawable(
|
||||
DrawablePtr *result,
|
||||
XID id,
|
||||
ClientPtr client,
|
||||
Mask type_mask,
|
||||
Mask access_mode);
|
||||
|
||||
extern pointer SecurityLookupDrawable(
|
||||
XID /*rid*/,
|
||||
ClientPtr /*client*/,
|
||||
Mask /*access_mode*/);
|
||||
extern int dixLookupGC(
|
||||
GCPtr *result,
|
||||
XID id,
|
||||
ClientPtr client,
|
||||
Mask access_mode);
|
||||
|
||||
extern WindowPtr LookupWindow(
|
||||
XID /*rid*/,
|
||||
ClientPtr /*client*/);
|
||||
extern int dixLookupClient(
|
||||
ClientPtr *result,
|
||||
XID id,
|
||||
ClientPtr client,
|
||||
Mask access_mode);
|
||||
|
||||
extern pointer LookupDrawable(
|
||||
XID /*rid*/,
|
||||
ClientPtr /*client*/);
|
||||
|
||||
#else
|
||||
|
||||
extern WindowPtr LookupWindow(
|
||||
XID /*rid*/,
|
||||
ClientPtr /*client*/);
|
||||
|
||||
extern pointer LookupDrawable(
|
||||
XID /*rid*/,
|
||||
ClientPtr /*client*/);
|
||||
|
||||
#define SecurityLookupWindow(rid, client, access_mode) \
|
||||
LookupWindow(rid, client)
|
||||
|
||||
#define SecurityLookupDrawable(rid, client, access_mode) \
|
||||
LookupDrawable(rid, client)
|
||||
|
||||
#endif /* XACE */
|
||||
|
||||
extern ClientPtr LookupClient(
|
||||
XID /*rid*/,
|
||||
ClientPtr /*client*/);
|
||||
/*
|
||||
* These are deprecated compatibility functions and will be removed soon!
|
||||
* Please use the new dixLookup*() functions above.
|
||||
*/
|
||||
extern WindowPtr SecurityLookupWindow(XID, ClientPtr, Mask);
|
||||
extern WindowPtr LookupWindow(XID, ClientPtr);
|
||||
extern pointer SecurityLookupDrawable(XID, ClientPtr, Mask);
|
||||
extern pointer LookupDrawable(XID, ClientPtr);
|
||||
extern ClientPtr LookupClient(XID, ClientPtr);
|
||||
/* end deprecated functions */
|
||||
|
||||
extern void NoopDDA(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ extern int ProcRecolorCursor(ClientPtr /* client */);
|
|||
extern void PostSyntheticMotion(DeviceIntPtr pDev,
|
||||
int x,
|
||||
int y,
|
||||
ScreenPtr pScreen,
|
||||
int screen,
|
||||
unsigned long time);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ extern void PostSyntheticMotion(
|
|||
DeviceIntPtr pDev,
|
||||
int x,
|
||||
int y,
|
||||
ScreenPtr pScreen,
|
||||
int screen,
|
||||
unsigned long time);
|
||||
|
||||
extern int GetMotionHistorySize(
|
||||
|
|
|
|||
|
|
@ -58,6 +58,16 @@ SOFTWARE.
|
|||
#define UNDRAWABLE_WINDOW 2
|
||||
#define DRAWABLE_BUFFER 3
|
||||
|
||||
/* corresponding type masks for dixLookupDrawable() */
|
||||
#define M_DRAWABLE_WINDOW (1<<0)
|
||||
#define M_DRAWABLE_PIXMAP (1<<1)
|
||||
#define M_UNDRAWABLE_WINDOW (1<<2)
|
||||
#define M_DRAWABLE_BUFFER (1<<3)
|
||||
#define M_ANY (-1)
|
||||
#define M_WINDOW (M_DRAWABLE_WINDOW|M_UNDRAWABLE_WINDOW)
|
||||
#define M_DRAWABLE (M_DRAWABLE_WINDOW|M_DRAWABLE_PIXMAP|M_DRAWABLE_BUFFER)
|
||||
#define M_UNDRAWABLE (M_UNDRAWABLE_WINDOW)
|
||||
|
||||
/* flags to PaintWindow() */
|
||||
#define PW_BACKGROUND 0
|
||||
#define PW_BORDER 1
|
||||
|
|
|
|||
|
|
@ -220,10 +220,11 @@ extern pointer LookupClientResourceComplex(
|
|||
* simultaneously.
|
||||
*/
|
||||
|
||||
#define SecurityUnknownAccess 0 /* don't know intentions */
|
||||
#define SecurityReadAccess (1<<0) /* inspecting the object */
|
||||
#define SecurityWriteAccess (1<<1) /* changing the object */
|
||||
#define SecurityDestroyAccess (1<<2) /* destroying the object */
|
||||
#define DixUnknownAccess 0 /* don't know intentions */
|
||||
#define DixReadAccess (1<<0) /* inspecting the object */
|
||||
#define DixWriteAccess (1<<1) /* changing the object */
|
||||
#define DixReadWriteAccess (DixReadAccess|DixWriteAccess)
|
||||
#define DixDestroyAccess (1<<2) /* destroying the object */
|
||||
|
||||
extern pointer SecurityLookupIDByType(
|
||||
ClientPtr /*client*/,
|
||||
|
|
|
|||
Loading…
Reference in a new issue