dix: Add client parameter to AddPassiveGrabsToList().

This commit is contained in:
Eamon Walsh 2007-10-18 12:24:55 -04:00 committed by Eamon Walsh
parent 31110d6837
commit 6107a24503
4 changed files with 7 additions and 7 deletions

View File

@ -566,7 +566,7 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode,
DeviceButtonPress, button, confineTo, cursor); DeviceButtonPress, button, confineTo, cursor);
if (!grab) if (!grab)
return BadAlloc; return BadAlloc;
return AddPassiveGrabToList(grab); return AddPassiveGrabToList(client, grab);
} }
int int
@ -621,7 +621,7 @@ GrabKey(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode,
NullWindow, NullCursor); NullWindow, NullCursor);
if (!grab) if (!grab)
return BadAlloc; return BadAlloc;
return AddPassiveGrabToList(grab); return AddPassiveGrabToList(client, grab);
} }
int int

View File

@ -4727,7 +4727,7 @@ ProcGrabKey(ClientPtr client)
NullWindow, NullCursor); NullWindow, NullCursor);
if (!grab) if (!grab)
return BadAlloc; return BadAlloc;
return AddPassiveGrabToList(grab); return AddPassiveGrabToList(client, grab);
} }
@ -4815,7 +4815,7 @@ ProcGrabButton(ClientPtr client)
stuff->button, confineTo, cursor); stuff->button, confineTo, cursor);
if (!grab) if (!grab)
return BadAlloc; return BadAlloc;
return AddPassiveGrabToList(grab); return AddPassiveGrabToList(client, grab);
} }
/** /**

View File

@ -307,7 +307,7 @@ GrabsAreIdentical(GrabPtr pFirstGrab, GrabPtr pSecondGrab)
* @return Success or X error code on failure. * @return Success or X error code on failure.
*/ */
int int
AddPassiveGrabToList(GrabPtr pGrab) AddPassiveGrabToList(ClientPtr client, GrabPtr pGrab)
{ {
GrabPtr grab; GrabPtr grab;
Mask access_mode = DixGrabAccess; Mask access_mode = DixGrabAccess;
@ -327,8 +327,7 @@ AddPassiveGrabToList(GrabPtr pGrab)
if (grab->keyboardMode == GrabModeSync || grab->pointerMode == GrabModeSync) if (grab->keyboardMode == GrabModeSync || grab->pointerMode == GrabModeSync)
access_mode |= DixFreezeAccess; access_mode |= DixFreezeAccess;
rc = XaceHook(XACE_DEVICE_ACCESS, clients[CLIENT_ID(grab->resource)], rc = XaceHook(XACE_DEVICE_ACCESS, client, grab->device, access_mode);
grab->device, access_mode);
if (rc != Success) if (rc != Success)
return rc; return rc;

View File

@ -50,6 +50,7 @@ extern Bool GrabMatchesSecond(
GrabPtr /* pSecondGrab */); GrabPtr /* pSecondGrab */);
extern int AddPassiveGrabToList( extern int AddPassiveGrabToList(
ClientPtr /* client */,
GrabPtr /* pGrab */); GrabPtr /* pGrab */);
extern Bool DeletePassiveGrabFromList( extern Bool DeletePassiveGrabFromList(