diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h index 476a46c93f..c7928aac4f 100644 --- a/src/lib/evas/Evas_Common.h +++ b/src/lib/evas/Evas_Common.h @@ -1047,6 +1047,30 @@ EAPI void evas_device_name_set(Evas_Device *dev, const char *name); */ EAPI const char *evas_device_name_get(const Evas_Device *dev); +/** + * Set the seat id of a device + * + * @p dev The device to set the seat id of + * @p name The seat id + * + * @since 1.20 + */ +EAPI void evas_device_seat_id_set(Evas_Device *dev, unsigned int id); + +/** + * Get the seat id of a device + * + * @p dev The device to query + * @return The device seat id or 0 if none is set + * + * This gets the seat id set by evas_device_seat id_set(). + * + * A seat id is the hardware id of the seat. + * + * @since 1.20 + */ +EAPI unsigned int evas_device_seat_id_get(const Evas_Device *dev); + /** * Set the description of a device as a string * diff --git a/src/lib/evas/canvas/evas_device.c b/src/lib/evas/canvas/evas_device.c index 80a5ab7fd9..3d63a4c7c1 100644 --- a/src/lib/evas/canvas/evas_device.c +++ b/src/lib/evas/canvas/evas_device.c @@ -349,6 +349,18 @@ evas_device_emulation_source_get(const Evas_Device *dev) return efl_input_device_source_get(dev); } +EAPI void +evas_device_seat_id_set(Evas_Device *dev, unsigned int id) +{ + efl_input_device_seat_id_set(dev, id); +} + +EAPI unsigned int +evas_device_seat_id_get(const Evas_Device *dev) +{ + return efl_input_device_seat_id_get(dev); +} + void _evas_device_cleanup(Evas *eo_e) { diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c index be7a22071b..58788566d0 100644 --- a/src/lib/evas/canvas/evas_main.c +++ b/src/lib/evas/canvas/evas_main.c @@ -1014,6 +1014,7 @@ evas_output_method_set(Evas *eo_e, int render_method) e->default_seat = evas_device_add_full(eo_e, "default", "The default seat", NULL, NULL, EVAS_DEVICE_CLASS_SEAT, EVAS_DEVICE_SUBCLASS_NONE); + evas_device_seat_id_set(e->default_seat, 1); e->default_mouse = evas_device_add_full(eo_e, "keyboard", "The default mouse", e->default_seat, NULL,