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:
parent
2a38f7c0db
commit
7af1240b57
|
@ -185,8 +185,8 @@ winUninstallColormap (ColormapPtr pmap)
|
||||||
/* Install the default cmap in place of the cmap to be uninstalled */
|
/* Install the default cmap in place of the cmap to be uninstalled */
|
||||||
if (pmap->mid != pmap->pScreen->defColormap)
|
if (pmap->mid != pmap->pScreen->defColormap)
|
||||||
{
|
{
|
||||||
curpmap = (ColormapPtr) LookupIDByType(pmap->pScreen->defColormap,
|
dixLookupResourceByType((pointer) &curpmap, pmap->pScreen->defColormap,
|
||||||
RT_COLORMAP);
|
RT_COLORMAP, NullClient, DixUnknownAccess);
|
||||||
(*pmap->pScreen->InstallColormap) (curpmap);
|
(*pmap->pScreen->InstallColormap) (curpmap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -462,7 +462,8 @@ winXIconToHICON (WindowPtr pWin, int iconSize)
|
||||||
winMultiWindowGetWMHints (pWin, &hints);
|
winMultiWindowGetWMHints (pWin, &hints);
|
||||||
if (!hints.icon_pixmap) return NULL;
|
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;
|
if (!iconPtr) return NULL;
|
||||||
|
|
||||||
|
@ -484,7 +485,8 @@ winXIconToHICON (WindowPtr pWin, int iconSize)
|
||||||
mask = calloc (maskStride, iconSize);
|
mask = calloc (maskStride, iconSize);
|
||||||
|
|
||||||
winScaleXBitmapToWindows (iconSize, effBPP, iconPtr, image);
|
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)
|
if (maskPtr)
|
||||||
{
|
{
|
||||||
|
@ -542,7 +544,7 @@ winUpdateIcon (Window id)
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
HICON hIcon, hIconSmall=NULL, hIconOld;
|
HICON hIcon, hIconSmall=NULL, hIconOld;
|
||||||
|
|
||||||
pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW);
|
dixLookupResourceByType((pointer) &pWin, id, RT_WINDOW, NullClient, DixUnknownAccess);
|
||||||
if (pWin)
|
if (pWin)
|
||||||
{
|
{
|
||||||
winWindowPriv(pWin);
|
winWindowPriv(pWin);
|
||||||
|
|
|
@ -810,7 +810,7 @@ winMinimizeWindow (Window id)
|
||||||
ErrorF ("winMinimizeWindow\n");
|
ErrorF ("winMinimizeWindow\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW);
|
dixLookupResourceByType((pointer) &pWin, id, RT_WINDOW, NullClient, DixUnknownAccess);
|
||||||
if (!pWin)
|
if (!pWin)
|
||||||
{
|
{
|
||||||
ErrorF("%s: NULL pWin. Leaving\n", __FUNCTION__);
|
ErrorF("%s: NULL pWin. Leaving\n", __FUNCTION__);
|
||||||
|
|
|
@ -164,7 +164,7 @@ winMWExtWMUpdateIcon (Window id)
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
HICON hIcon, hiconOld;
|
HICON hIcon, hiconOld;
|
||||||
|
|
||||||
pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW);
|
dixLookupResourceByType((pointer) &pWin, id, RT_WINDOW, NullClient, DixUnknownAccess);
|
||||||
hIcon = winOverrideIcon ((unsigned long)pWin);
|
hIcon = winOverrideIcon ((unsigned long)pWin);
|
||||||
|
|
||||||
if (!hIcon)
|
if (!hIcon)
|
||||||
|
|
|
@ -148,7 +148,8 @@ WMFreeClient (pointer data, XID id)
|
||||||
WMEventPtr *pHead, pCur, pPrev;
|
WMEventPtr *pHead, pCur, pPrev;
|
||||||
|
|
||||||
pEvent = (WMEventPtr) data;
|
pEvent = (WMEventPtr) data;
|
||||||
pHead = (WMEventPtr *) LookupIDByType(eventResource, eventResourceType);
|
dixLookupResourceByType((pointer) &pHead, eventResource, eventResourceType,
|
||||||
|
NullClient, DixUnknownAccess);
|
||||||
if (pHead)
|
if (pHead)
|
||||||
{
|
{
|
||||||
pPrev = 0;
|
pPrev = 0;
|
||||||
|
@ -193,8 +194,7 @@ ProcWindowsWMSelectInput (register ClientPtr client)
|
||||||
XID clientResource;
|
XID clientResource;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xWindowsWMSelectInputReq);
|
REQUEST_SIZE_MATCH (xWindowsWMSelectInputReq);
|
||||||
pHead = (WMEventPtr *)SecurityLookupIDByType(client, eventResource,
|
dixLookupResourceByType((pointer) &pHead, eventResource, eventResourceType, client, DixWriteAccess);
|
||||||
eventResourceType, DixWriteAccess);
|
|
||||||
if (stuff->mask != 0)
|
if (stuff->mask != 0)
|
||||||
{
|
{
|
||||||
if (pHead)
|
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",
|
ErrorF ("winWindowsWMSendEvent %d %d %d %d, %d %d - %d %d\n",
|
||||||
type, mask, which, arg, x, y, w, h);
|
type, mask, which, arg, x, y, w, h);
|
||||||
#endif
|
#endif
|
||||||
pHead = (WMEventPtr *) LookupIDByType(eventResource, eventResourceType);
|
dixLookupResourceByType((pointer) &pHead, eventResource, eventResourceType,
|
||||||
|
NullClient, DixUnknownAccess);
|
||||||
if (!pHead)
|
if (!pHead)
|
||||||
return;
|
return;
|
||||||
for (pEvent = *pHead; pEvent; pEvent = pEvent->next)
|
for (pEvent = *pHead; pEvent; pEvent = pEvent->next)
|
||||||
|
|
Loading…
Reference in New Issue