From 864c46c895bf6b7a042032cd6ed4beaa9189207a Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Fri, 28 Jul 2023 18:59:04 +0900 Subject: [PATCH] Fix issue not to process additional key event Change-Id: I225e03a8c54f0f9e83ee22e67226834062640d3c Signed-off-by: Jihoon Kim --- src/bin/e_input_event.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/bin/e_input_event.c b/src/bin/e_input_event.c index a1665c73b9..612347d868 100755 --- a/src/bin/e_input_event.c +++ b/src/bin/e_input_event.c @@ -24,9 +24,8 @@ e_input_event_process(GSource *source) while ((ev = (E_Input_Event *)g_queue_pop_head(ev_source->ev_queue))) { - if (_process_filter_event(ev_source, ev)) { - _process_event_handler(ev_source, ev); - } + if (_process_filter_event(ev_source, ev)) + _process_event_handler(ev_source, ev); if (ev->free_func) ev->free_func(ev->free_func_data, ev->ev_data); @@ -46,7 +45,6 @@ EINTERN E_Input_Event_Source * e_input_event_source_create() { E_Input_Event_Source *source = (E_Input_Event_Source *)g_source_new(&_event_source_funcs, sizeof(E_Input_Event_Source)); - source->ev_queue = g_queue_new(); return source; @@ -62,6 +60,7 @@ e_input_event_source_destroy(E_Input_Event_Source *source) { if (ev->free_func) ev->free_func(ev->free_func_data, ev->ev_data); + free(ev); } @@ -206,8 +205,9 @@ _process_event_handler(E_Input_Event_Source *ev_source, E_Input_Event *ev) static void _e_input_event_send(E_Input_Event_Source *source, E_Input_Event *ev) { - if (source) - g_queue_push_tail(source->ev_queue, ev); + if (!source) return; + + g_queue_push_tail(source->ev_queue, ev); } E_API void @@ -222,4 +222,6 @@ e_input_event_add(E_Input_Event_Source *source, int event_type, void *ev_data, e ev->free_func_data = free_func_data; _e_input_event_send(source, ev); + + e_input_event_process(source); } -- 2.34.1