diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2019-12-12 06:05:21 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2019-12-12 06:05:21 +0000 |
commit | dff4a3473cbf3db68b2fa5b43e51f8c05ae6b029 (patch) | |
tree | ae898a699dbc977738010eaae623435d2ccee50a /xserver/Xi/exevents.c | |
parent | 005295117c63143b3bf6d69d4503b360e660cf49 (diff) |
Update to X server 1.20.6. Tested by naddy@
Diffstat (limited to 'xserver/Xi/exevents.c')
-rw-r--r-- | xserver/Xi/exevents.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/xserver/Xi/exevents.c b/xserver/Xi/exevents.c index 17d751e31..659816a46 100644 --- a/xserver/Xi/exevents.c +++ b/xserver/Xi/exevents.c @@ -1293,14 +1293,21 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti, int rc; InputClients *iclients = NULL; *mask = NULL; + *grab = NULL; if (listener->type == LISTENER_GRAB || listener->type == LISTENER_POINTER_GRAB) { - *grab = listener->grab; BUG_RETURN_VAL(!*grab, FALSE); + } + else if (ti->emulate_pointer && dev->deviceGrab.grab && + !dev->deviceGrab.fromPassiveGrab) { + /* There may be an active pointer grab on the device */ + *grab = dev->deviceGrab.grab; + } + if (*grab) { *client = rClient(*grab); *win = (*grab)->window; *mask = (*grab)->xi2mask; @@ -1357,8 +1364,6 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti, /* if owner selected, oclients is NULL */ *client = oclients ? rClient(oclients) : wClient(*win); } - - *grab = NULL; } return TRUE; @@ -1498,16 +1503,6 @@ DeliverEmulatedMotionEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, &mask)) return; - /* There may be a pointer grab on the device */ - if (!grab) { - grab = dev->deviceGrab.grab; - if (grab) { - win = grab->window; - mask = grab->xi2mask; - client = rClient(grab); - } - } - DeliverTouchEmulatedEvent(dev, ti, (InternalEvent*)&motion, &ti->listeners[0], client, win, grab, mask); } |