[PATCH 37/42] Xi: add the hooks for passive touch grabs

Chase Douglas chase.douglas at canonical.com
Tue Dec 20 11:33:57 PST 2011


On 12/14/2011 07:02 PM, Peter Hutterer wrote:
> diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
> index 713a165..fa2db38 100644
> --- a/Xi/xipassivegrab.c
> +++ b/Xi/xipassivegrab.c
> @@ -108,19 +108,29 @@ ProcXIPassiveGrabDevice(ClientPtr client)
>      if (stuff->grab_type != XIGrabtypeButton &&
>          stuff->grab_type != XIGrabtypeKeycode &&
>          stuff->grab_type != XIGrabtypeEnter &&
> -        stuff->grab_type != XIGrabtypeFocusIn)
> +        stuff->grab_type != XIGrabtypeFocusIn &&
> +        stuff->grab_type != XIGrabtypeTouchBegin)
>      {
>          client->errorValue = stuff->grab_type;
>          return BadValue;
>      }
>  
>      if ((stuff->grab_type == XIGrabtypeEnter ||
> -         stuff->grab_type == XIGrabtypeFocusIn) && stuff->detail != 0)
> +         stuff->grab_type == XIGrabtypeFocusIn ||
> +         stuff->grab_type == XIGrabtypeTouchBegin) && stuff->detail != 0)
>      {
>          client->errorValue = stuff->detail;
>          return BadValue;
>      }
>  
> +    if (stuff->grab_type == XIGrabtypeTouchBegin &&
> +        (stuff->grab_mode != GrabModeAsync ||

This should check that grab_mode is GrabModeTouch, unless
XIGrabModeTouch is converted to GrabModeAsync somewhere else...

-- Chase


More information about the xorg-devel mailing list