mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-24 01:40:36 +00:00
Fix most remaining deprecated resource lookups.
Callsites updated to use dixLookupResourceBy{Type,Class}.
TODO: Audit access modes to make sure they reflect the usage.
This commit is contained in:
parent
1abe0ee3da
commit
57aff88c7d
50 changed files with 1017 additions and 1037 deletions
|
|
@ -94,12 +94,10 @@ int ProcXChangeDeviceCursor(ClientPtr client)
|
|||
}
|
||||
else
|
||||
{
|
||||
pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor,
|
||||
RT_CURSOR, DixReadAccess);
|
||||
if (!pCursor)
|
||||
{
|
||||
return BadCursor;
|
||||
}
|
||||
rc = dixLookupResourceByType((pointer *)&pCursor, stuff->cursor,
|
||||
RT_CURSOR, client, DixReadAccess);
|
||||
if (rc != Success)
|
||||
return (rc == BadValue) ? BadCursor : rc;
|
||||
}
|
||||
|
||||
ChangeWindowDeviceCursor(pWin, pDev, pCursor);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ ProcXExtendedGrabDevice(ClientPtr client)
|
|||
{
|
||||
xExtendedGrabDeviceReply rep;
|
||||
DeviceIntPtr dev;
|
||||
int rc = Success,
|
||||
int rc,
|
||||
errval = 0,
|
||||
i;
|
||||
WindowPtr grab_window,
|
||||
|
|
@ -145,14 +145,12 @@ ProcXExtendedGrabDevice(ClientPtr client)
|
|||
|
||||
if (stuff->cursor)
|
||||
{
|
||||
cursor = (CursorPtr)SecurityLookupIDByType(client,
|
||||
stuff->cursor,
|
||||
RT_CURSOR,
|
||||
DixReadAccess);
|
||||
if (!cursor)
|
||||
{
|
||||
rc = dixLookupResourceByType((pointer *)&cursor, stuff->cursor,
|
||||
RT_CURSOR, client, DixReadAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
errval = stuff->cursor;
|
||||
rc = BadCursor;
|
||||
rc = (rc == BadValue) ? BadCursor : rc;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue