diff options
Diffstat (limited to 'Xi/exevents.c')
-rw-r--r-- | Xi/exevents.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 29c617c14..dd3e90ae5 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1373,6 +1373,16 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, int nevents; DeviceIntPtr kbd; + /* There may be a pointer grab on the device */ + if (!grab) { + grab = dev->deviceGrab.grab; + if (grab) { + win = grab->window; + xi2mask = grab->xi2mask; + client = rClient(grab); + } + } + /* We don't deliver pointer events to non-owners */ if (!TouchResourceIsOwner(ti, listener->listener)) return !Success; @@ -1502,16 +1512,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); } |