e_keyrouter: fix invalid keycode issue 23/308423/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 25 Mar 2024 07:37:50 +0000 (16:37 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 25 Mar 2024 08:14:37 +0000 (17:14 +0900)
Change-Id: I038f0cd74849f46413f7240a4d27c1ad16fa2592
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/bin/e_comp_wl_input.c
src/bin/e_input_inputs.c
src/bin/e_keyrouter.c

index 2c7389e..47b5913 100644 (file)
@@ -6,6 +6,7 @@
 #include "e_comp_object_intern.h"
 #include "e_comp_input_intern.h"
 #include "e_policy_intern.h"
+#include "e_keyrouter_intern.h"
 
 #include <sys/mman.h>
 #include <fcntl.h>
index 54238cf..91570da 100644 (file)
@@ -861,14 +861,22 @@ input_thread_start(void *data, Ecore_Thread *th)
    InputEventSource *input_event_source = NULL;
    GIOChannel *_pipe_iochannel = NULL;
    GSource *pipe_source = NULL;
+   E_Keyrouter_Config_Data *kconfig = NULL;
 
    if (!(input = data)) return;
 
    eina_thread_name_set(eina_thread_self(), "input-thread");
 
+   kconfig = krt->conf;
+
    e_input_libinput_context_create(input);
 
    e_comp_wl_input_keymap_init();
+   e_keyrouter_conf_init(kconfig);
+
+   krt->pictureoff_disabled = !!kconfig->conf->pictureoff_disabled;
+   krt->composition_key.waiting_time = kconfig->conf->composition_key_wait_time;
+
    e_keyrouter_query_tizen_key_table();
 
    INF("write wm_ready");
index b81cb59..e892b44 100644 (file)
@@ -658,13 +658,17 @@ e_keyrouter_init(void)
 
    kconfig = E_NEW(E_Keyrouter_Config_Data, 1);
    EINA_SAFETY_ON_NULL_GOTO(kconfig, err);
-
-   e_keyrouter_conf_init(kconfig);
-   EINA_SAFETY_ON_NULL_GOTO(kconfig->conf, err);
    krt->conf = kconfig;
-   krt->pictureoff_disabled = !!kconfig->conf->pictureoff_disabled;
 
-   krt->composition_key.waiting_time = kconfig->conf->composition_key_wait_time;
+   if (!e_input_thread_mode_get())
+     {
+        e_keyrouter_conf_init(kconfig);
+        EINA_SAFETY_ON_NULL_GOTO(kconfig->conf, err);
+        krt->conf = kconfig;
+        krt->pictureoff_disabled = !!kconfig->conf->pictureoff_disabled;
+
+        krt->composition_key.waiting_time = kconfig->conf->composition_key_wait_time;
+     }
 
    res = e_keyrouter_wl_init();
    EINA_SAFETY_ON_FALSE_GOTO(res, err);
@@ -695,10 +699,13 @@ e_keyrouter_init(void)
    return EINA_TRUE;
 
 err:
-   if (kconfig)
+   if (!e_input_thread_mode_get())
      {
-        e_keyrouter_conf_deinit(kconfig);
-        E_FREE(kconfig);
+        if (kconfig)
+          {
+             e_keyrouter_conf_deinit(kconfig);
+             E_FREE(kconfig);
+          }
      }
    _e_keyrouter_deinit_handlers();
    e_keyrouter_wl_shutdown();