[PATCH] Xi: Don't check for TOUCH_END, it's never set

Chase Douglas chase.douglas at ubuntu.com
Fri Sep 7 19:42:09 PDT 2012

On Fri, Sep 7, 2012 at 6:48 PM, Daniel Drake <dsd at laptop.org> wrote:
> This flag is never set, so checking for it here means that we'll
> never release the simulated mouse button press after the user touches
> (and releases) the touchscreen for the first time.
> Fixes a problem where the XO laptop touchpad became totally
> unusable after touching the screen for the first time (since X then
> behaved as if the mouse button was held down all the time).
> Signed-off-by: Daniel Drake <dsd at laptop.org>
> ---
>  Xi/exevents.c | 2 --
>  1 file changed, 2 deletions(-)
> diff --git a/Xi/exevents.c b/Xi/exevents.c
> index 494d07e..6ed4991 100644
> --- a/Xi/exevents.c
> +++ b/Xi/exevents.c
> @@ -949,8 +949,6 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent *event)
>          if (!(event->flags & TOUCH_POINTER_EMULATED))
>              return DONT_PROCESS;
> -        if (!(event->flags & TOUCH_END))
> -            return DONT_PROCESS;
>          DecreaseButtonCount(device, key, &t->buttonsDown, &t->motionMask,
>                              &t->state);

I could have sworn this had been removed by now. I remember deleting
it at one point during one of my debugging sessions and being
surprised it was still there at that point.

I agree that this should be removed. The question is: will this cause
any regression? I suggest running it through Peter's test repo, and I
would also suggest adding a test to it for the issue you have found,

Although I worry about it causing a regression elsewhere, there is
nothing in the patch that is wrong, so:

Reviewed-by: Chase Douglas <chase.douglas at ubuntu.com>


More information about the xorg-devel mailing list