e_comp_wl: call e_keyrouter_wl_event_surface_send directly 10/314210/2
authorSooChan Lim <sc1.lim@samsung.com>
Fri, 5 Jul 2024 01:32:31 +0000 (10:32 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 8 Jul 2024 23:34:08 +0000 (23:34 +0000)
e_keyrouter_event_surface_send function is redundency.

Change-Id: I69af8920bfd4aefa82497cef7d56b62b8a1d5f35

src/bin/inputmgr/e_keyrouter.c
src/bin/inputmgr/e_keyrouter_intern.h
src/bin/server/e_comp_wl.c

index ce69dc8019e178f3df5e0bc925b2669802a13fa3..5bb6c00967d0d8f0ea642c1700484e6a7aa1986a 100644 (file)
@@ -605,23 +605,6 @@ e_keyrouter_composition_key_del(int *keys, int count)
    KLINF("Delete %d and %d key composition.\n", keys[0], keys[1]);
 }
 
-EINTERN void
-e_keyrouter_event_surface_send(E_Client *ec, int key)
-{
-   struct wl_resource *surface = NULL;
-   EINA_SAFETY_ON_NULL_RETURN(krt);
-   EINA_SAFETY_ON_NULL_RETURN(ec);
-   EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
-
-   surface = e_comp_wl_client_surface_get(ec);
-   EINA_SAFETY_ON_NULL_RETURN(surface);
-   key = key - 8;
-
-   e_comp_wl_connection_lock();
-   e_keyrouter_wl_event_surface_send(surface, key, TIZEN_KEYROUTER_MODE_NONE);
-   e_comp_wl_connection_unlock();
-}
-
 EINTERN void
 e_keyrouter_input_handler_add(void)
 {
index 25b8954a58fa6aa5c09944942117e4c4c7eafe22..5d1da2f764b5eebb050c547015ba35656e338327 100644 (file)
@@ -153,8 +153,6 @@ EINTERN void e_keyrouter_longkey_del(int keycode);
 EINTERN int  e_keyrouter_composition_key_add(int *keys, int count);
 EINTERN void e_keyrouter_composition_key_del(int *keys, int count);
 
-EINTERN void e_keyrouter_event_surface_send(E_Client *ec, int key);
-
 EINTERN void e_keyrouter_input_handler_add(void);
 
 EINTERN Eina_Bool e_keyrouter_query_tizen_key_table(void);
index 0d5ed2e2a005be1dcb2d007e6639c1b2c3c0ab25..638ea75c3cd50598d9d117d8c45701dd487f4d64 100644 (file)
@@ -22,7 +22,7 @@
 #include "e_comp_wl_viewport_intern.h"
 #include "e_comp_intern.h"
 #include "e_input_backend_intern.h"
-#include "e_keyrouter_intern.h"
+#include "e_keyrouter_wl_intern.h"
 #include "e_error_intern.h"
 #include "e_pointer_intern.h"
 #include "e_presentation_time_intern.h"
@@ -4315,7 +4315,10 @@ e_comp_wl_key_send(E_Client *ec, int keycode, Eina_Bool pressed, void *dev, uint
    else state = WL_KEYBOARD_KEY_STATE_RELEASED;
 
    comp_conf = e_comp_config_get();
-   e_keyrouter_event_surface_send(ec, keycode);
+
+   e_comp_wl_connection_lock();
+   e_keyrouter_wl_event_surface_send(surface, wl_keycode, TIZEN_KEYROUTER_MODE_NONE);
+   e_comp_wl_connection_unlock();
 
    if (e_config->key_input_ttrace_enable)
      {
@@ -4403,7 +4406,10 @@ e_comp_wl_key_cancel(E_Client *ec, int keycode, Ecore_Device *dev, uint32_t time
    if (!time) time = e_util_timestamp_get();
 
    comp_conf = e_comp_config_get();
-   e_keyrouter_event_surface_send(ec, keycode);
+
+   e_comp_wl_connection_lock();
+   e_keyrouter_wl_event_surface_send(surface, wl_keycode, TIZEN_KEYROUTER_MODE_NONE);
+   e_comp_wl_connection_unlock();
 
    EINA_LIST_FOREACH(e_comp_input_key->kbd.resources, l, res)
      {