libweston: require connected heads for input devices
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 20 Mar 2018 11:29:40 +0000 (13:29 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 20 Apr 2018 12:27:54 +0000 (15:27 +0300)
commit8dc6db8c76ac3065d1c37b5a7fb375651f6dab49
tree64c63fc9bbea35aaef4e110329c3d29cbbbdc082
parentfd02efbc84a3c963a79bb74e5b1cd0e54fee74da
libweston: require connected heads for input devices

The use case driving this change is a clone mode setup, where the user
is hotplugging or unplugging a cloned touchscreen. Even if the output
and head are force-enabled, the touch device should still follow the
connector connection status. If there is no video signal for the
touchscreen (disconnected connector), then the touch input should be
ignored as well.

When the output is force-enabled, we need to trigger
output_heads_changed from connector status changes. If the head or
output are not force-enabled, the compositor will likely attach and
detach the head as appropriate. In clone mode, the attach or detach
needs to trigger output_heads_changed directly. In other cases, it may
be handled through the output getting enabled or disabled which are
different signals.

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