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
commit2e5251b36431e162fdb309c364661de2f80179b3 (patch)
treec1982df7ef40c02dfa89678664e7bd8cdcbd0765 /src/lib/ecore_wl2/ecore_wl2_input.c
parentecore-wl2: add 'cancelled' to Ecore_Wl2_Event_Data_Source_End (diff)
downloadefl-2e5251b36431e162fdb309c364661de2f80179b3.tar.gz
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
input->xkb.keymap = NULL;
return;
}
+ {
+ Ecore_Wl2_Event_Seat_Keymap_Changed *ev = malloc(sizeof(Ecore_Wl2_Event_Seat_Keymap_Changed));
+ if (ev)
+ {
+ ev->id = input->id;
+ ev->display = input->display;
+ input->display->refs++;
+ ecore_event_add(ECORE_WL2_EVENT_SEAT_KEYMAP_CHANGED, ev, _display_event_free, ev->display);
+ }
+ }
input->xkb.control_mask =
1 << xkb_map_mod_get_index(input->xkb.keymap, XKB_MOD_NAME_CTRL);
@@ -1019,6 +1029,7 @@ static void
_keyboard_cb_repeat_setup(void *data, struct wl_keyboard *keyboard EINA_UNUSED, int32_t rate, int32_t delay)
{
Ecore_Wl2_Input *input;
+ Ecore_Wl2_Event_Seat_Keyboard_Repeat_Changed *ev;
input = data;
if (!input) return;
@@ -1032,6 +1043,14 @@ _keyboard_cb_repeat_setup(void *data, struct wl_keyboard *keyboard EINA_UNUSED,
input->repeat.enabled = EINA_TRUE;
input->repeat.rate = (1.0 / rate);
input->repeat.delay = (delay / 1000.0);
+ ev = malloc(sizeof(Ecore_Wl2_Event_Seat_Keymap_Changed));
+ if (ev)
+ {
+ ev->id = input->id;
+ ev->display = input->display;
+ ev->display->refs++;
+ ecore_event_add(ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED, ev, _display_event_free, ev->display);
+ }
}
static const struct wl_keyboard_listener _keyboard_listener =