diff --git a/Xi/exevents.c b/Xi/exevents.c index 599b55aaa..e58d99581 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -2533,7 +2533,7 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, else if (grabtype == XI2) type = XI_ButtonPress; - grab = CreateGrab(client->index, dev, modifier_device, pWin, grabtype, + grab = CreateGrab(client, dev, modifier_device, pWin, grabtype, mask, param, type, button, confineTo, cursor); if (!grab) return BadAlloc; @@ -2581,7 +2581,7 @@ GrabKey(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, if (rc != Success) return rc; - grab = CreateGrab(client->index, dev, modifier_device, pWin, grabtype, + grab = CreateGrab(client, dev, modifier_device, pWin, grabtype, mask, param, type, key, NULL, NULL); if (!grab) return BadAlloc; @@ -2624,7 +2624,7 @@ GrabWindow(ClientPtr client, DeviceIntPtr dev, int type, if (rc != Success) return rc; - grab = CreateGrab(client->index, dev, dev, pWin, XI2, + grab = CreateGrab(client, dev, dev, pWin, XI2, mask, param, (type == XIGrabtypeEnter) ? XI_Enter : XI_FocusIn, 0, NULL, cursor); @@ -2655,7 +2655,7 @@ GrabTouchOrGesture(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr mod_dev, if (rc != Success) return rc; - grab = CreateGrab(client->index, dev, mod_dev, pWin, XI2, + grab = CreateGrab(client, dev, mod_dev, pWin, XI2, mask, param, type, 0, NullWindow, NullCursor); if (!grab) return BadAlloc; diff --git a/dix/dixgrabs_priv.h b/dix/dixgrabs_priv.h index 12e8824d2..cbdc289ed 100644 --- a/dix/dixgrabs_priv.h +++ b/dix/dixgrabs_priv.h @@ -64,7 +64,7 @@ void FreeGrab(GrabPtr grab); * Create a new grab for given client, with given parameters. * Returns NULL on OOM. * - * @param client _Index_ of the client who will hold the grab + * @param pClient ClientPtr to the client who will hold the grab * @param device Device that's being grabbed * @param modDevice Device whose modifiers are used (NULL = use core keyboard) * @param window the window getting the events @@ -77,7 +77,7 @@ void FreeGrab(GrabPtr grab); * @param cursor cursor to be used while grabbed (may be NULL) * @return newly created grab. Must be freed by ::FreeGrab() */ -GrabPtr CreateGrab(int client, +GrabPtr CreateGrab(ClientPtr pClient, DeviceIntPtr device, DeviceIntPtr modDevice, WindowPtr window, diff --git a/dix/events.c b/dix/events.c index 716546aa1..fe727dc2f 100644 --- a/dix/events.c +++ b/dix/events.c @@ -5673,7 +5673,7 @@ ProcGrabKey(ClientPtr client) mask.core = (KeyPressMask | KeyReleaseMask); - grab = CreateGrab(client->index, keybd, keybd, pWin, CORE, &mask, + grab = CreateGrab(client, keybd, keybd, pWin, CORE, &mask, ¶m, KeyPress, stuff->key, NullWindow, NullCursor); if (!grab) return BadAlloc; @@ -5767,7 +5767,7 @@ ProcGrabButton(ClientPtr client) mask.core = stuff->eventMask; - grab = CreateGrab(client->index, ptr, modifierDevice, pWin, + grab = CreateGrab(client, ptr, modifierDevice, pWin, CORE, &mask, ¶m, ButtonPress, stuff->button, confineTo, cursor); if (!grab) diff --git a/dix/grabs.c b/dix/grabs.c index dc6946051..9b856c944 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -214,7 +214,7 @@ AllocGrab(const GrabPtr src) } GrabPtr -CreateGrab(int client, DeviceIntPtr device, DeviceIntPtr modDevice, +CreateGrab(ClientPtr client, DeviceIntPtr device, DeviceIntPtr modDevice, WindowPtr window, enum InputLevel grabtype, GrabMask *mask, GrabParameters *param, int eventType, KeyCode keybut, /* key or button */ @@ -225,7 +225,7 @@ CreateGrab(int client, DeviceIntPtr device, DeviceIntPtr modDevice, grab = AllocGrab(NULL); if (!grab) return (GrabPtr) NULL; - grab->resource = FakeClientID(client); + grab->resource = FakeClientID(client->index); grab->device = device; grab->window = window; if (grabtype == CORE || grabtype == XI) @@ -645,7 +645,7 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab) param.other_devices_mode = grab->pointerMode; param.modifiers = any_modifier; - pNewGrab = CreateGrab(dixClientIdForXID(grab->resource), grab->device, + pNewGrab = CreateGrab(dixClientForXID(grab->resource), grab->device, grab->modifierDevice, grab->window, grab->grabtype, (GrabMask *) &grab->eventMask,