aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_wl2/ecore_wl2_input.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-05-12 12:08:32 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-05-12 12:08:25 -0400
commit8afe0a7a6ccee6352d6f67b89a616f189cb0284e (patch)
treed038206dde71c697e851ea6674581ac17477e071 /src/lib/ecore_wl2/ecore_wl2_input.c
parentecore-wl2: add checks for a valid display object in ecore_wl2_input fns (diff)
downloadefl-8afe0a7a6ccee6352d6f67b89a616f189cb0284e.tar.gz
ecore-wl2: store names for inputs and add api for retrieving name
@feature
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_input.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index b95fbd6145..29b53a9f4d 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -1281,6 +1281,7 @@ _seat_cb_name(void *data, struct wl_seat *seat EINA_UNUSED, const char *name)
Ecore_Wl2_Input *input;
input = data;
+ eina_stringshare_replace(&input->name, name);
ev = calloc(1, sizeof(Ecore_Wl2_Event_Seat_Name));
EINA_SAFETY_ON_NULL_RETURN(ev);
@@ -1518,6 +1519,7 @@ _ecore_wl2_input_del(Ecore_Wl2_Input *input)
EINA_INLIST_FOREACH(display->windows, window)
if (window->input == input) window->input = NULL;
+ eina_stringshare_replace(&input->name, NULL);
free(input);
}
@@ -1593,6 +1595,13 @@ ecore_wl2_input_seat_capabilities_get(Ecore_Wl2_Input *input)
return cap;
}
+EAPI Eina_Stringshare *
+ecore_wl2_input_name_get(Ecore_Wl2_Input *input)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL);
+ return input->name;
+}
+
EAPI unsigned int
ecore_wl2_input_seat_id_get(Ecore_Wl2_Input *input)
{