mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
evdev: Add clutter_evdev_event_sequence_get_slot()
This function helps know the libinput slot used by a sequence. https://bugzilla.gnome.org/show_bug.cgi?id=728968
This commit is contained in:
@ -222,3 +222,23 @@ clutter_evdev_input_device_get_libinput_device (ClutterInputDevice *device)
|
||||
|
||||
return device_evdev->libinput_device;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_evdev_event_sequence_get_slot:
|
||||
* @sequence: a #ClutterEventSequence
|
||||
*
|
||||
* Retrieves the touch slot triggered by this @sequence
|
||||
*
|
||||
* Returns: the libinput touch slot.
|
||||
*
|
||||
* Since: 1.20
|
||||
* Stability: unstable
|
||||
**/
|
||||
gint32
|
||||
clutter_evdev_event_sequence_get_slot (const ClutterEventSequence *sequence)
|
||||
{
|
||||
if (!sequence)
|
||||
return -1;
|
||||
|
||||
return GPOINTER_TO_INT (sequence) - 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user