Add loud warnings to deprecated lookup functions.
Hopefully this will alert external driver maintainers.
This commit is contained in:
parent
ab1d5b0c31
commit
0128073568
|
@ -281,39 +281,53 @@ dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access)
|
||||||
* These are deprecated compatibility functions and will be removed soon!
|
* These are deprecated compatibility functions and will be removed soon!
|
||||||
* Please use the new dixLookup*() functions above.
|
* Please use the new dixLookup*() functions above.
|
||||||
*/
|
*/
|
||||||
_X_EXPORT WindowPtr
|
_X_EXPORT _X_DEPRECATED WindowPtr
|
||||||
SecurityLookupWindow(XID id, ClientPtr client, Mask access_mode)
|
SecurityLookupWindow(XID id, ClientPtr client, Mask access_mode)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
int i = dixLookupWindow(&pWin, id, client, access_mode);
|
int i = dixLookupWindow(&pWin, id, client, access_mode);
|
||||||
|
static int warn = 1;
|
||||||
|
if (warn-- > 0)
|
||||||
|
ErrorF("Warning: LookupWindow()/SecurityLookupWindow() "
|
||||||
|
"are deprecated. Please convert your driver/module "
|
||||||
|
"to use dixLookupWindow().\n");
|
||||||
return (i == Success) ? pWin : NULL;
|
return (i == Success) ? pWin : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT WindowPtr
|
_X_EXPORT _X_DEPRECATED WindowPtr
|
||||||
LookupWindow(XID id, ClientPtr client)
|
LookupWindow(XID id, ClientPtr client)
|
||||||
{
|
{
|
||||||
return SecurityLookupWindow(id, client, DixUnknownAccess);
|
return SecurityLookupWindow(id, client, DixUnknownAccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT pointer
|
_X_EXPORT _X_DEPRECATED pointer
|
||||||
SecurityLookupDrawable(XID id, ClientPtr client, Mask access_mode)
|
SecurityLookupDrawable(XID id, ClientPtr client, Mask access_mode)
|
||||||
{
|
{
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
int i = dixLookupDrawable(&pDraw, id, client, M_DRAWABLE, access_mode);
|
int i = dixLookupDrawable(&pDraw, id, client, M_DRAWABLE, access_mode);
|
||||||
|
static int warn = 1;
|
||||||
|
if (warn-- > 0)
|
||||||
|
ErrorF("Warning: LookupDrawable()/SecurityLookupDrawable() "
|
||||||
|
"are deprecated. Please convert your driver/module "
|
||||||
|
"to use dixLookupDrawable().\n");
|
||||||
return (i == Success) ? pDraw : NULL;
|
return (i == Success) ? pDraw : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT pointer
|
_X_EXPORT _X_DEPRECATED pointer
|
||||||
LookupDrawable(XID id, ClientPtr client)
|
LookupDrawable(XID id, ClientPtr client)
|
||||||
{
|
{
|
||||||
return SecurityLookupDrawable(id, client, DixUnknownAccess);
|
return SecurityLookupDrawable(id, client, DixUnknownAccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT ClientPtr
|
_X_EXPORT _X_DEPRECATED ClientPtr
|
||||||
LookupClient(XID id, ClientPtr client)
|
LookupClient(XID id, ClientPtr client)
|
||||||
{
|
{
|
||||||
ClientPtr pClient;
|
ClientPtr pClient;
|
||||||
int i = dixLookupClient(&pClient, id, client, DixUnknownAccess);
|
int i = dixLookupClient(&pClient, id, client, DixUnknownAccess);
|
||||||
|
static int warn = 1;
|
||||||
|
if (warn-- > 0)
|
||||||
|
ErrorF("Warning: LookupClient() is deprecated. Please convert your "
|
||||||
|
"driver/module to use dixLookupClient().\n");
|
||||||
return (i == Success) ? pClient : NULL;
|
return (i == Success) ? pClient : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue