[PATCH v2 2/5] input: Record grab pointer in TouchListener

Keith Packard keithp at keithp.com
Tue Jan 8 16:33:06 PST 2013


Peter Hutterer <peter.hutterer at who-t.net> writes:

> Changes since v1:
> - reset the grab of the listener currently removed to NULL, not the last
>   listener

Yeah, your patch looks correct where mine was clearly busted (it was
smashing the grab pointer on the *last* listener, not the one which was
getting removed).

> diff --git a/dix/touch.c b/dix/touch.c
> index d890b62..99f105b 100644
> @@ -702,6 +706,11 @@ TouchRemoveListener(TouchPointInfoPtr ti, XID resource)
>          if (ti->listeners[i].listener == resource) {
>              int j;
>  
> +            if (ti->listeners[i].grab) {
> +                ti->listeners[i].grab = NULL;
> +                ti->num_grabs--;
> +            }
> +
>              for (j = i; j < ti->num_listeners - 1; j++)
>                  ti->listeners[j] = ti->listeners[j + 1];
>              ti->num_listeners--;

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20130108/d8a06c8c/attachment.pgp>


More information about the xorg-devel mailing list