summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorThomas Jaeger <ThJaeger@gmail.com>2012-10-13 23:08:27 -0400
committerPeter Hutterer <peter.hutterer@who-t.net>2012-11-20 15:42:46 +1000
commitfe59774c55e5d423633405e0869c22f4ce382548 (patch)
tree994477165bcf86166a42b0ba377e0ff4d9c0ff9d /Xi
parentcc79107a5b60d2926e16ddbee04149e8d5acc969 (diff)
Don't use GetTouchEvents in EmitTouchEnd
As before GetTouchEvents causes unwanted side effects. Add a new function GetDixTouchEnd, which generates a touch event from the touch point. We fill in the event's screen coordinates from the MD's current sprite position. Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 4248b9a86..2caf98c25 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1066,24 +1066,14 @@ ActivateEarlyAccept(DeviceIntPtr dev, TouchPointInfoPtr ti)
static void
EmitTouchEnd(DeviceIntPtr dev, TouchPointInfoPtr ti, int flags, XID resource)
{
- InternalEvent *tel = InitEventList(GetMaximumEventsNum());
- ValuatorMask *mask = valuator_mask_new(2);
- int i, nev;
-
- valuator_mask_set_double(mask, 0,
- valuator_mask_get_double(ti->valuators, 0));
- valuator_mask_set_double(mask, 1,
- valuator_mask_get_double(ti->valuators, 1));
+ InternalEvent event;
flags |= TOUCH_CLIENT_ID;
if (ti->emulate_pointer)
flags |= TOUCH_POINTER_EMULATED;
- nev = GetTouchEvents(tel, dev, ti->client_id, XI_TouchEnd, flags, mask);
- for (i = 0; i < nev; i++)
- DeliverTouchEvents(dev, ti, tel + i, resource);
-
- valuator_mask_free(&mask);
- FreeEventList(tel, GetMaximumEventsNum());
+ TouchDeliverDeviceClassesChangedEvent(ti, GetTimeInMillis(), resource);
+ GetDixTouchEnd(&event, dev, ti, flags);
+ DeliverTouchEvents(dev, ti, &event, resource);
}
/**