derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1e2626a70cd11d6610510158cd0f6c4b4b8adcc4
commit 1e2626a70cd11d6610510158cd0f6c4b4b8adcc4 Author: Derek Foreman <der...@osg.samsung.com> Date: Tue May 8 13:26:57 2018 -0500 ee_wayland: retain seat names when creating a new canvas Summary: We were creating seats with silly arbitray names like seat-11 when creating a new canvas. Depends on D6130 Reviewers: zmike, cedric Reviewed By: zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6131 --- .../engines/wayland/ecore_evas_wayland_common.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 1324d23dae..e0f9e6e49c 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -999,7 +999,7 @@ _ecore_evas_wl_common_device_event_add(int event_type, Ecore_Wl2_Device_Type dev } static EE_Wl_Device * -_ecore_evas_wl_common_seat_add(Ecore_Evas *ee, unsigned int id) +_ecore_evas_wl_common_seat_add(Ecore_Evas *ee, unsigned int id, const char *name) { Ecore_Evas_Engine_Wl_Data *wdata; EE_Wl_Device *device; @@ -1009,9 +1009,13 @@ _ecore_evas_wl_common_seat_add(Ecore_Evas *ee, unsigned int id) device = calloc(1, sizeof(EE_Wl_Device)); EINA_SAFETY_ON_NULL_RETURN_VAL(device, NULL); - snprintf(buf, sizeof(buf), "seat-%u", id); + if (!name) + { + snprintf(buf, sizeof(buf), "seat-%u", id); + name = buf; + } dev = - evas_device_add_full(ee->evas, buf, "Wayland seat", NULL, NULL, + evas_device_add_full(ee->evas, name, "Wayland seat", NULL, NULL, EVAS_DEVICE_CLASS_SEAT, EVAS_DEVICE_SUBCLASS_NONE); EINA_SAFETY_ON_NULL_GOTO(dev, err_dev); evas_device_seat_id_set(dev, id); @@ -1059,7 +1063,7 @@ _ecore_evas_wl_common_cb_global_added(void *d EINA_UNUSED, int t EINA_UNUSED, vo if (already_present) continue; - if (!_ecore_evas_wl_common_seat_add(ee, ev->id)) + if (!_ecore_evas_wl_common_seat_add(ee, ev->id, NULL)) break; } @@ -2291,10 +2295,12 @@ _ecore_wl2_devices_setup(Ecore_Evas *ee, Ecore_Wl2_Display *display) EE_Wl_Device *device; Ecore_Wl2_Seat_Capabilities cap; unsigned int id; + Eina_Stringshare *name; id = ecore_wl2_input_seat_id_get(input); cap = ecore_wl2_input_seat_capabilities_get(input); - device = _ecore_evas_wl_common_seat_add(ee, id); + name = ecore_wl2_input_name_get(input); + device = _ecore_evas_wl_common_seat_add(ee, id, name); if (!device) { --