summaryrefslogtreecommitdiff
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
commit2e5251b36431e162fdb309c364661de2f80179b3 (patch)
treec1982df7ef40c02dfa89678664e7bd8cdcbd0765 /src/lib/ecore_wl2/ecore_wl2_input.c
parentd119fdded93feaf13d2c9ea6ca47b4d84b57bb08 (diff)
ecore-wl2: add events for changes in keymap, selection, and kbd repeat rate
@feature
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_input.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 9c7f5d959a..1cd8ea8ede 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -824,6 +824,16 @@ _keyboard_cb_keymap(void *data, struct wl_keyboard *keyboard EINA_UNUSED, unsign
824 input->xkb.keymap = NULL; 824 input->xkb.keymap = NULL;
825 return; 825 return;
826 } 826 }
827 {
828 Ecore_Wl2_Event_Seat_Keymap_Changed *ev = malloc(sizeof(Ecore_Wl2_Event_Seat_Keymap_Changed));
829 if (ev)
830 {
831 ev->id = input->id;
832 ev->display = input->display;
833 input->display->refs++;
834 ecore_event_add(ECORE_WL2_EVENT_SEAT_KEYMAP_CHANGED, ev, _display_event_free, ev->display);
835 }
836 }
827 837
828 input->xkb.control_mask = 838 input->xkb.control_mask =
829 1 << xkb_map_mod_get_index(input->xkb.keymap, XKB_MOD_NAME_CTRL); 839 1 << xkb_map_mod_get_index(input->xkb.keymap, XKB_MOD_NAME_CTRL);
@@ -1019,6 +1029,7 @@ static void
1019_keyboard_cb_repeat_setup(void *data, struct wl_keyboard *keyboard EINA_UNUSED, int32_t rate, int32_t delay) 1029_keyboard_cb_repeat_setup(void *data, struct wl_keyboard *keyboard EINA_UNUSED, int32_t rate, int32_t delay)
1020{ 1030{
1021 Ecore_Wl2_Input *input; 1031 Ecore_Wl2_Input *input;
1032 Ecore_Wl2_Event_Seat_Keyboard_Repeat_Changed *ev;
1022 1033
1023 input = data; 1034 input = data;
1024 if (!input) return; 1035 if (!input) return;
@@ -1032,6 +1043,14 @@ _keyboard_cb_repeat_setup(void *data, struct wl_keyboard *keyboard EINA_UNUSED,
1032 input->repeat.enabled = EINA_TRUE; 1043 input->repeat.enabled = EINA_TRUE;
1033 input->repeat.rate = (1.0 / rate); 1044 input->repeat.rate = (1.0 / rate);
1034 input->repeat.delay = (delay / 1000.0); 1045 input->repeat.delay = (delay / 1000.0);
1046 ev = malloc(sizeof(Ecore_Wl2_Event_Seat_Keymap_Changed));
1047 if (ev)
1048 {
1049 ev->id = input->id;
1050 ev->display = input->display;
1051 ev->display->refs++;
1052 ecore_event_add(ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED, ev, _display_event_free, ev->display);
1053 }
1035} 1054}
1036 1055
1037static const struct wl_keyboard_listener _keyboard_listener = 1056static const struct wl_keyboard_listener _keyboard_listener =