libinput: use head names for output matching
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 19 Mar 2018 12:55:41 +0000 (14:55 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 20 Apr 2018 12:27:54 +0000 (15:27 +0300)
commitfd02efbc84a3c963a79bb74e5b1cd0e54fee74da
treee243d7df02a485b0ecade3686af425e5ea238721
parent98d50cc3112dcd6e32118bdc7adc266773ace1cc
libinput: use head names for output matching

Associating input devices with weston_outputs by the output name fails
when one output has several heads. We need to match against head names
instead of output names to be able to find all names.

This fixes touchscreen output association in shared-CRTC clone mode when
outputs or input devices appear or disappear.

Even though notify_output_create() is called only when new outputs
appear, the implementation is prepared to also remove output
associations. This will be handy in the future when this function will
handle also head detaching from an output that remains enabled.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
libweston/libinput-seat.c