[PATCH weston 1/2] evdev: Discard events from a touchscreen paired with an unplugged output

Eoff, Ullysses A ullysses.a.eoff at intel.com
Tue Apr 22 18:21:04 PDT 2014


Hmmm... I think there's more to reconcile for touch device pairing/mapping.

In device_added(), we assign a default output to a paired device when the
the requested output isn't found.  That behavior just changed about a day
ago to fix another bug.  But perhaps I wasn't seeing the big picture at the
time when I changed that.  I admit that the notify_output_destroy() handler
logic felt a little odd to me, though.

Assigning the paired device's output to something (NULL or default) when the
requested output doesn't exist should be the same logic as when the paired
device's output is unplugged.  And possibly the same as when the device doesn't
specify a pairing preference.  Even before this commit, the logic didn't reconcile
with that notion either, afaict.

And, of course, when the requested output is hotplugged the paired device's
output needs to be reconciled (which is currently the case).

----
U. Artie

> -----Original Message-----
> From: wayland-devel [mailto:wayland-devel-bounces at lists.freedesktop.org] On Behalf Of Ander Conselvan de Oliveira
> Sent: Tuesday, April 22, 2014 8:02 AM
> To: wayland-devel at lists.freedesktop.org
> Cc: Conselvan De Oliveira, Ander
> Subject: [PATCH weston 1/2] evdev: Discard events from a touchscreen paired with an unplugged output
> 
> From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
> 
> Commit 17bccaed intended to make the events coming from a touchscreen
> paired with an unplugged output to be discarded, while an unpaired one
> would just choose a different output. However, the logic was inverted
> causing the opposite to happen.
> ---
>  src/evdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/evdev.c b/src/evdev.c
> index bc8e5ef..9d97c87 100644
> --- a/src/evdev.c
> +++ b/src/evdev.c
> @@ -602,7 +602,7 @@ notify_output_destroy(struct wl_listener *listener, void *data)
>  	struct weston_compositor *c = device->seat->compositor;
>  	struct weston_output *output;
> 
> -	if (device->output_name) {
> +	if (!device->output_name) {
>  		output = container_of(c->output_list.next,
>  				      struct weston_output, link);
>  		evdev_device_set_output(device, output);
> --
> 1.8.3.2
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list