Xming: Replace all the uses of deprecated functions in hw/xwin with current ones

Replace uses of LookupIDByType() and SecurityLookupIDByType()
with dixLookupResourceByType()

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
Colin Harrison 2009-11-04 14:20:17 +00:00 committed by Jon TURNEY
parent 2a38f7c0db
commit 7af1240b57
5 changed files with 14 additions and 11 deletions

View File

@ -185,8 +185,8 @@ winUninstallColormap (ColormapPtr pmap)
/* Install the default cmap in place of the cmap to be uninstalled */
if (pmap->mid != pmap->pScreen->defColormap)
{
curpmap = (ColormapPtr) LookupIDByType(pmap->pScreen->defColormap,
RT_COLORMAP);
dixLookupResourceByType((pointer) &curpmap, pmap->pScreen->defColormap,
RT_COLORMAP, NullClient, DixUnknownAccess);
(*pmap->pScreen->InstallColormap) (curpmap);
}
}

View File

@ -462,7 +462,8 @@ winXIconToHICON (WindowPtr pWin, int iconSize)
winMultiWindowGetWMHints (pWin, &hints);
if (!hints.icon_pixmap) return NULL;
iconPtr = (PixmapPtr) LookupIDByType (hints.icon_pixmap, RT_PIXMAP);
dixLookupResourceByType((pointer) &iconPtr, hints.icon_pixmap, RT_PIXMAP,
NullClient, DixUnknownAccess);
if (!iconPtr) return NULL;
@ -484,7 +485,8 @@ winXIconToHICON (WindowPtr pWin, int iconSize)
mask = calloc (maskStride, iconSize);
winScaleXBitmapToWindows (iconSize, effBPP, iconPtr, image);
maskPtr = (PixmapPtr) LookupIDByType (hints.icon_mask, RT_PIXMAP);
dixLookupResourceByType((pointer) &maskPtr, hints.icon_mask, RT_PIXMAP,
NullClient, DixUnknownAccess);
if (maskPtr)
{
@ -542,7 +544,7 @@ winUpdateIcon (Window id)
WindowPtr pWin;
HICON hIcon, hIconSmall=NULL, hIconOld;
pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW);
dixLookupResourceByType((pointer) &pWin, id, RT_WINDOW, NullClient, DixUnknownAccess);
if (pWin)
{
winWindowPriv(pWin);

View File

@ -810,7 +810,7 @@ winMinimizeWindow (Window id)
ErrorF ("winMinimizeWindow\n");
#endif
pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW);
dixLookupResourceByType((pointer) &pWin, id, RT_WINDOW, NullClient, DixUnknownAccess);
if (!pWin)
{
ErrorF("%s: NULL pWin. Leaving\n", __FUNCTION__);

View File

@ -164,7 +164,7 @@ winMWExtWMUpdateIcon (Window id)
WindowPtr pWin;
HICON hIcon, hiconOld;
pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW);
dixLookupResourceByType((pointer) &pWin, id, RT_WINDOW, NullClient, DixUnknownAccess);
hIcon = winOverrideIcon ((unsigned long)pWin);
if (!hIcon)

View File

@ -148,7 +148,8 @@ WMFreeClient (pointer data, XID id)
WMEventPtr *pHead, pCur, pPrev;
pEvent = (WMEventPtr) data;
pHead = (WMEventPtr *) LookupIDByType(eventResource, eventResourceType);
dixLookupResourceByType((pointer) &pHead, eventResource, eventResourceType,
NullClient, DixUnknownAccess);
if (pHead)
{
pPrev = 0;
@ -193,8 +194,7 @@ ProcWindowsWMSelectInput (register ClientPtr client)
XID clientResource;
REQUEST_SIZE_MATCH (xWindowsWMSelectInputReq);
pHead = (WMEventPtr *)SecurityLookupIDByType(client, eventResource,
eventResourceType, DixWriteAccess);
dixLookupResourceByType((pointer) &pHead, eventResource, eventResourceType, client, DixWriteAccess);
if (stuff->mask != 0)
{
if (pHead)
@ -294,7 +294,8 @@ winWindowsWMSendEvent (int type, unsigned int mask, int which, int arg,
ErrorF ("winWindowsWMSendEvent %d %d %d %d, %d %d - %d %d\n",
type, mask, which, arg, x, y, w, h);
#endif
pHead = (WMEventPtr *) LookupIDByType(eventResource, eventResourceType);
dixLookupResourceByType((pointer) &pHead, eventResource, eventResourceType,
NullClient, DixUnknownAccess);
if (!pHead)
return;
for (pEvent = *pHead; pEvent; pEvent = pEvent->next)