• Louis-Francis Ratté-Boulianne's avatar
    input: introduce weston_touch_device · 6ef59c98
    Louis-Francis Ratté-Boulianne authored
    Introduce weston_touch_device for libweston core to track individual
    touchscreen input devices. A weston_seat/weston_touch may be an
    aggregation of several physical touchscreen input devices. Separating
    the physical devices will be required for implementing touchscreen
    calibration. One can only calibrate one device at a time, and we want to
    make sure to handle the right one.
    
    Both backends that support touch devices are updated to create
    weston_touch_devices. Wayland-backend provides touch devices that cannot
    be calibrated, because we have no access to raw touch coordinates from
    the device - calibration is the responsibility of the parent display
    server. Libinput backend provides touch devices that can be calibrated,
    hence implementing the set and get calibration hooks.
    
    Backends need to maintain an output pointer in any case, so we have a
    get_output() hook instead of having to maintain an identical field in
    weston_touch_device. The same justification applies to
    get_calibration_head_name.
    
    Also update the test plugin to manage weston_touch_device objects.
    
    Co-developed by Louis-Francis and Pekka.
    
    v2:
    - Consistently use 'cal' instead of 'calb' or 'matrix'.
    - change devpath into syspath
    - update copyrights
    Signed-off-by: Louis-Francis Ratté-Boulianne's avatarLouis-Francis Ratté-Boulianne <lfrb@collabora.com>
    Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
    v1 Tested-by: Matt Hoosier <matt.hoosier@gmail.com>
    Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
    6ef59c98
libinput-device.h 2.43 KB