Lines Matching defs:grab
695 * may have an active touch grab, so we need to keep the touch class record
714 * may have an active gesture grab, so we need to keep the gesture class record
1032 * TouchBegin event if there is at least one grab active.
1072 GrabPtr grab, WindowPtr win, InternalEvent *ev)
1083 if (!grab && ti->num_grabs != 0 &&
1110 GrabPtr grab = ti->listeners[0].grab;
1114 BUG_RETURN(!grab);
1116 client = rClient(grab);
1120 ErrorF("[Xi] Failed to accept touch grab after early acceptance.\n");
1196 /* If the last owner is not a touch grab, finalise the touch, we
1201 listener->grab->grabtype != XI2 ||
1202 !xi2mask_isset(listener->grab->xi2mask, dev, XI_TouchBegin))) {
1258 * ti->num_listeners, as well as ti->num_grabs if it was a grab. */
1272 * Processes a TouchOwnership event, indicating a grab has accepted the touch
1273 * it currently owns, or a grab or selection has been removed. Will generate
1296 /* For pointer-emulated listeners that ungrabbed the active grab,
1318 else { /* this is the very first ownership event for a grab */
1347 * @param[out] grab The grab to deliver the event through, if any.
1348 * @param[out] mask The XI 2.x event mask of the grab or selection, if any.
1355 ClientPtr *client, WindowPtr *win, GrabPtr *grab,
1364 *grab = listener->grab;
1366 BUG_RETURN_VAL(!*grab, FALSE);
1368 *client = rClient(*grab);
1369 *win = (*grab)->window;
1370 *mask = (*grab)->xi2mask;
1425 *grab = NULL;
1434 ClientPtr client, WindowPtr win, GrabPtr grab,
1442 /* There may be a pointer grab on the device */
1443 if (!grab) {
1444 grab = dev->deviceGrab.grab;
1445 if (grab) {
1446 win = grab->window;
1447 xi2mask = grab->xi2mask;
1448 client = rClient(grab);
1475 if (grab) {
1477 if (ev->any.type == ET_TouchBegin && !dev->deviceGrab.grab)
1478 ActivatePassiveGrab(dev, grab, ptrev, ev); /* also delivers the event */
1482 /* 'grab' is the passive grab, but if the grab isn't active,
1484 if (!dev->deviceGrab.grab)
1487 if (grab->ownerEvents) {
1491 deliveries = DeliverDeviceEvents(sprite_win, ptrev, grab, focus, dev);
1495 deliveries = DeliverOneGrabbedEvent(ptrev, dev, grab->grabtype);
1506 dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab)) {
1514 GrabPtr devgrab = dev->deviceGrab.grab;
1517 DeliverDeviceEvents(sprite_win, ptrev, grab, win, dev);
1519 * Implicit passive grab activated in response to this event. Store
1522 if (!devgrab && dev->deviceGrab.grab && dev->deviceGrab.implicitGrab) {
1526 devgrab = dev->deviceGrab.grab;
1533 * selection. Implicit grab activation occurs through delivering an
1538 l->grab = g;
1565 GrabPtr grab;
1577 &ti->listeners[0], &client, &win, &grab,
1582 win, grab, mask);
1601 * spec for more information), this implements its own grab and event-selection
1626 /* Active pointer grab */
1627 if (emulate_pointer && dev->deviceGrab.grab && !dev->deviceGrab.fromPassiveGrab &&
1628 (dev->deviceGrab.grab->grabtype == CORE ||
1629 dev->deviceGrab.grab->grabtype == XI ||
1630 !xi2mask_isset(dev->deviceGrab.grab->xi2mask, dev, XI_TouchBegin)))
1632 /* Active pointer grab on touch point and we get a TouchEnd - claim this
1643 * - An explicit grab is active on the device
1644 * - The grab is a pointer grab
1646 * This allows for an explicit grab to receive pointer events for an already
1714 GrabPtr grab = dev->deviceGrab.grab;
1722 if (grab)
1731 /* A client has a grab, deliver to this client if the grab_window is the
1736 if (grab &&
1737 CLIENT_ID(be->barrierid) == CLIENT_ID(grab->resource) &&
1738 grab->window->drawable.id == be->window) {
1763 * spec for more information), this implements its own grab and event-selection
1797 dev->deviceGrab.grab &&
1799 GrabIsGestureGrab(dev->deviceGrab.grab))
1821 GrabPtr grab;
1899 grab = device->deviceGrab.grab;
1907 if (!grab && CheckDeviceGrabs(device, ev, 0))
1911 if (grab && device->deviceGrab.fromPassiveGrab &&
1913 GrabIsKeyboardGrab(device->deviceGrab.grab))
1920 if (!grab && CheckDeviceGrabs(device, ev, 0)) {
1921 /* if a passive grab was activated, the event has been sent
1930 if (grab && !b->buttonsDown &&
1932 GrabIsPointerGrab(device->deviceGrab.grab))
1941 if (grab)
2026 ClientPtr client, WindowPtr win, GrabPtr grab,
2036 grab, xi2mask);
2041 dev->deviceGrab.grab &&
2043 dev->deviceGrab.grab->pointerMode == GrabModeAsync)
2052 rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
2077 WindowPtr win, GrabPtr grab, XI2Mask *xi2mask)
2083 /* Note: If the active grab was ungrabbed, we already changed the
2090 grab, xi2mask);
2114 rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
2122 rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
2143 WindowPtr win, GrabPtr grab, XI2Mask *xi2mask)
2155 rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
2162 rc = DeliverTouchBeginEvent(dev, ti, ev, listener, client, win, grab,
2168 DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, grab,
2172 rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
2175 rc = DeliverTouchEndEvent(dev, ti, ev, listener, client, win, grab,
2204 GrabPtr grab = NULL;
2214 &grab, &mask))
2217 DeliverTouchEvent(dev, ti, ev, listener, client, win, grab, mask);
2226 GrabPtr grab, WindowPtr win, InternalEvent *ev)
2259 * @param[out] grab The grab to deliver the event through, if any.
2265 ClientPtr *client, WindowPtr *win, GrabPtr *grab)
2270 *grab = NULL;
2274 *grab = listener->grab;
2276 BUG_RETURN_VAL(!*grab, FALSE);
2278 *client = rClient(*grab);
2279 *win = (*grab)->window;
2310 GrabPtr grab = NULL;
2318 if (!RetrieveGestureDeliveryData(dev, ev, &gi->listener, &client, &win, &grab))
2323 return DeliverOneGestureEvent(client, dev, gi, grab, win, ev);
2486 GrabPtr grab;
2527 grab = CreateGrab(client->index, dev, modifier_device, pWin, grabtype,
2529 if (!grab)
2531 return AddPassiveGrabToList(client, grab);
2543 GrabPtr grab;
2575 grab = CreateGrab(client->index, dev, modifier_device, pWin, grabtype,
2577 if (!grab)
2579 return AddPassiveGrabToList(client, grab);
2582 /* Enter/FocusIn grab */
2589 GrabPtr grab;
2618 grab = CreateGrab(client->index, dev, dev, pWin, XI2,
2623 if (!grab)
2626 return AddPassiveGrabToList(client, grab);
2629 /* Touch grab */
2635 GrabPtr grab;
2649 grab = CreateGrab(client->index, dev, mod_dev, pWin, XI2,
2651 if (!grab)
2654 return AddPassiveGrabToList(client, grab);
2707 !(check & DevicePointerMotionHintMask) && !dev->deviceGrab.grab)
3030 * Deactivating a device grab should cause focus events. */
3032 if (dev->deviceGrab.grab && (dev->deviceGrab.grab->window == pWin))
3041 /* If a grab is in progress, then alter the mode of focus events. */
3043 if (dev->deviceGrab.grab)
3149 deviceKeyButtonPointer *xE, GrabPtr grab,
3161 else if ((type == DeviceButtonPress) && (!grab) &&
3204 GrabPtr grab = dev->deviceGrab.grab;
3208 if ((grab && SameClient(grab, client) &&
3209 ((grab->eventMask & DevicePointerMotionHintMask) ||
3210 (grab->ownerEvents &&
3213 (!grab &&