Skip to content

Simplify SeatInterface::touchDown() api

Vlad Zahorodnii requested to merge work/simplify-touch-down-api into master

Currently, the compositor is supposed to pass the position of the touch point to the touchDown() function and in return get its unique global id. The id can be be passed to subsequent touchMotion() and touchUp().

The compositor is responsible for mapping between libinput slots and internal touch point ids.

The mapping step is unnecessary and adds in some complexity as the input code now has to keep the mapping table up to date.

This change makes the touch API more convenient to use by making relevant functions take touch ids that are assigned by the compositor. Usually, compositor would use libinput_event_touch_get_seat_slot() to get touch ids.

It also allows introducing event objects that can be useful later in the future.

Edited by Vlad Zahorodnii

Merge request reports