[PATCH] Do sent TouchEnd to listeners that don't own an accepted touch

Peter Hutterer peter.hutterer at who-t.net
Sun Jul 29 23:30:01 PDT 2012


On Thu, Jul 26, 2012 at 01:40:29PM -0700, Chase Douglas wrote:
> On 07/26/2012 01:31 PM, Daniel d'Andrada wrote:
> >When the owner of a touch accepts it, the other listeners must
> >receive a TouchEnd.
> >
> >Even though there's code implementing the logic above in
> >ProcessTouchOwnershipEvent(), DeliverTouchEndEvent() was refusing to send
> >those TouchEnd events in this situatuation.
> >
> >Signed-off-by: Daniel d'Andrada <daniel.dandrada at canonical.com>
> >---
> >  Xi/exevents.c |    6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> >diff --git a/Xi/exevents.c b/Xi/exevents.c
> >index 9f6ec84..494d07e 100644
> >--- a/Xi/exevents.c
> >+++ b/Xi/exevents.c
> >@@ -1888,6 +1888,12 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
> >          if (normal_end)
> >              listener->state = LISTENER_HAS_END;
> >      }
> >+    else if (ev->device_event.flags & TOUCH_ACCEPT) {
> >+        /* Touch has been accepted by its owner, which is not this listener */
> >+        if (listener->state != LISTENER_HAS_END)
> >+            rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
> >+        listener->state = LISTENER_HAS_END;
> >+    }
> >
> >   out:
> >      return rc;
> 
> We simply missed this one during development :(.
> 
> I want to make an integration test for this, but I don't have the
> time to do it right this minute.
> 
> Reviewed-by: Chase Douglas <chase.douglas at canonical.com>

merged into my branch, thanks.

Cheers,
   Peter



More information about the xorg-devel mailing list