xserver: Branch 'master'
Eamon Walsh
ewalsh at kemper.freedesktop.org
Sat Dec 16 01:28:26 EET 2006
dix/dixutils.c | 24 +++++++++++++++++++-----
1 files changed, 19 insertions(+), 5 deletions(-)
New commits:
diff-tree 012807356883128fde58bb2d4f91dd356d6418fc (from ab1d5b0c31a1cfce95ab6b1d06f209f2c44e19ac)
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date: Fri Dec 15 18:27:16 2006 -0500
Add loud warnings to deprecated lookup functions.
Hopefully this will alert external driver maintainers.
diff --git a/dix/dixutils.c b/dix/dixutils.c
index 2859b96..084d2e4 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -281,39 +281,53 @@ dixLookupClient(ClientPtr *pClient, XID
* These are deprecated compatibility functions and will be removed soon!
* Please use the new dixLookup*() functions above.
*/
-_X_EXPORT WindowPtr
+_X_EXPORT _X_DEPRECATED WindowPtr
SecurityLookupWindow(XID id, ClientPtr client, Mask access_mode)
{
WindowPtr pWin;
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;
}
-_X_EXPORT WindowPtr
+_X_EXPORT _X_DEPRECATED WindowPtr
LookupWindow(XID id, ClientPtr client)
{
return SecurityLookupWindow(id, client, DixUnknownAccess);
}
-_X_EXPORT pointer
+_X_EXPORT _X_DEPRECATED pointer
SecurityLookupDrawable(XID id, ClientPtr client, Mask access_mode)
{
DrawablePtr pDraw;
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;
}
-_X_EXPORT pointer
+_X_EXPORT _X_DEPRECATED pointer
LookupDrawable(XID id, ClientPtr client)
{
return SecurityLookupDrawable(id, client, DixUnknownAccess);
}
-_X_EXPORT ClientPtr
+_X_EXPORT _X_DEPRECATED ClientPtr
LookupClient(XID id, ClientPtr client)
{
ClientPtr pClient;
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;
}
More information about the xorg-commit
mailing list