[PATCH 1/3] Don't update listener after deactivating implicit pointer grab

Peter Hutterer peter.hutterer at who-t.net
Thu Apr 12 21:22:54 PDT 2012


On Tue, Apr 10, 2012 at 05:12:40PM -0700, Chase Douglas wrote:
> After the pointer grab is deactivated, the touch listener record is
> updated at the end of DeliverTouchEmulatedEvent. However, the touch
> record is ended when the grab is deactivated, so the update to the
> listener record is in an array of memory that has been freed.
> 
> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>

series merged, thanks

Cheers,
  Peter

> ---
>  Xi/exevents.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/Xi/exevents.c b/Xi/exevents.c
> index ff22240..3117123 100644
> --- a/Xi/exevents.c
> +++ b/Xi/exevents.c
> @@ -1389,8 +1389,10 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
>  
>              if (ev->any.type == ET_TouchEnd &&
>                  !dev->button->buttonsDown &&
> -                dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab))
> +                dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab)) {
>                  (*dev->deviceGrab.DeactivateGrab) (dev);
> +                return Success;
> +            }
>          }
>      }
>      else {
> -- 
> 1.7.9.1
> 


More information about the xorg-devel mailing list