summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Harrison <colin.harrison@virgin.net>2009-11-04 14:20:17 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2009-11-09 20:33:32 +0000
commit7af1240b57daa4ec55512276a9fda499d923eaa0 (patch)
tree24918a8ba52584841b5ef4d32bb76158bdd58d93
parent2a38f7c0dbc890e6408eee143d77719f265d583d (diff)
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>
-rw-r--r--hw/xwin/wincmap.c4
-rw-r--r--hw/xwin/winmultiwindowicons.c8
-rw-r--r--hw/xwin/winmultiwindowwindow.c2
-rwxr-xr-xhw/xwin/winwin32rootlesswindow.c2
-rwxr-xr-xhw/xwin/winwindowswm.c9
5 files changed, 14 insertions, 11 deletions
diff --git a/hw/xwin/wincmap.c b/hw/xwin/wincmap.c
index 7ebe00244..9da03888d 100644
--- a/hw/xwin/wincmap.c
+++ b/hw/xwin/wincmap.c
@@ -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);
}
}
diff --git a/hw/xwin/winmultiwindowicons.c b/hw/xwin/winmultiwindowicons.c
index 9f46a64d9..cb27d2fe3 100644
--- a/hw/xwin/winmultiwindowicons.c
+++ b/hw/xwin/winmultiwindowicons.c
@@ -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);
diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c
index e2b5ed291..631f1a97d 100644
--- a/hw/xwin/winmultiwindowwindow.c
+++ b/hw/xwin/winmultiwindowwindow.c
@@ -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__);
diff --git a/hw/xwin/winwin32rootlesswindow.c b/hw/xwin/winwin32rootlesswindow.c
index 2b2f63010..3a49ead69 100755
--- a/hw/xwin/winwin32rootlesswindow.c
+++ b/hw/xwin/winwin32rootlesswindow.c
@@ -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)
diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c
index 5b164ea96..3d4d8c208 100755
--- a/hw/xwin/winwindowswm.c
+++ b/hw/xwin/winwindowswm.c
@@ -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)