e_keyrouter: Support a API to send event_surface 06/239206/1 accepted/tizen/5.5/unified/20200729.230622 submit/tizen_5.5/20200727.115344
authorjeon <jhyuni.kang@samsung.com>
Wed, 22 Jul 2020 10:30:16 +0000 (19:30 +0900)
committerJeongHyun Kang <jhyuni.kang@samsung.com>
Wed, 22 Jul 2020 11:29:44 +0000 (11:29 +0000)
Change-Id: I16be5141433d3d082fda7182d0f57fd39eb42642

src/bin/e_comp_wl.c
src/bin/e_keyrouter.c
src/bin/e_keyrouter.h
src/bin/e_keyrouter_private.h
src/bin/e_keyrouter_wl.c

index 57c945a74d3b9adef2835a2f97f94d599cb52423..503de2d6680080ba9714d88bb08ced6bdda363f7 100644 (file)
@@ -5130,6 +5130,7 @@ e_comp_wl_key_send(E_Client *ec, int keycode, Eina_Bool pressed, Ecore_Device *d
    else state = WL_KEYBOARD_KEY_STATE_RELEASED;
 
    comp_conf = e_comp_config_get();
+   e_keyrouter_event_surface_send(ec, keycode);
 
    EINA_LIST_FOREACH(e_comp_wl->kbd.resources, l, res)
      {
@@ -5233,6 +5234,7 @@ e_comp_wl_key_cancel(E_Client *ec, int keycode, Ecore_Device *dev, uint32_t time
    if (!time) time = (uint32_t)(ecore_time_get() * 1000);
 
    comp_conf = e_comp_config_get();
+   e_keyrouter_event_surface_send(ec, keycode);
 
    EINA_LIST_FOREACH(e_comp_wl->kbd.resources, l, res)
      {
index 1e922fb19e67c6c4f2a6d941baa526da126e2f2b..68434e9520a50f827e99a3b2a2c766efafb44d14 100644 (file)
@@ -571,6 +571,17 @@ e_keyrouter_composition_key_del(int *keys, int count)
    KLINF("Delete %d and %d key composition.\n", keys[0], keys[1]);
 }
 
+E_API void
+e_keyrouter_event_surface_send(E_Client *ec, int key)
+{
+   EINA_SAFETY_ON_NULL_RETURN(krt);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
+   EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
+   EINA_SAFETY_ON_NULL_RETURN(ec->comp_data->surface);
+   key = key - 8;
+
+   e_keyrouter_wl_event_surface_send(ec->comp_data->surface, key, TIZEN_KEYROUTER_MODE_NONE);
+}
 
 E_API int
 e_keyrouter_init(void)
index c6b2a4ff6ab402baadb541e3c4422e19465b04af..ebc2c30129d236bc93523db5b74545ce70329431 100644 (file)
@@ -137,6 +137,8 @@ E_API void e_keyrouter_longkey_del(int keycode);
 E_API int e_keyrouter_composition_key_add(int *keys, int count);
 E_API void e_keyrouter_composition_key_del(int *keys, int count);
 
+E_API void e_keyrouter_event_surface_send(E_Client *ec, int key);
+
 #endif
 #endif
 
index 0cb0e162f1e3ee4a87dbbdd0da76eff6a0cdf6ac..fa0cf29e31b353bac10a4cb7ffaa366ec57100ef 100644 (file)
@@ -132,3 +132,5 @@ Eina_Bool e_keyrouter_event_process(void *event, int type);
 
 Eina_Bool e_keyrouter_wl_key_send(Ecore_Event_Key *ev, Eina_Bool pressed, struct wl_client *client, struct wl_resource *surface, Eina_Bool focused);
 void e_keyrouter_keycancel_send(struct wl_client *client, struct wl_resource *surface, unsigned int key);
+void e_keyrouter_wl_event_surface_send(struct wl_resource *surface, int key, int mode);
+
index 01cde312251e37173efaafe725e5137b20f312b9..57cf32abb3062e856f191b643500bb4067e8d11d 100644 (file)
@@ -1,7 +1,7 @@
 #include "e_keyrouter_private.h"
 
-static void
-_e_keyrouter_event_surface_send(struct wl_resource *surface, int key, int mode)
+void
+e_keyrouter_wl_event_surface_send(struct wl_resource *surface, int key, int mode)
 {
    Eina_List *l;
    struct wl_resource *res_data;
@@ -39,7 +39,7 @@ _e_keyrouter_wl_key_send(Ecore_Event_Key *ev, enum wl_keyboard_key_state state,
 
    if (surface && !focused)
      {
-        _e_keyrouter_event_surface_send(surface, ev->keycode, TIZEN_KEYROUTER_MODE_NONE);
+        e_keyrouter_wl_event_surface_send(surface, ev->keycode, TIZEN_KEYROUTER_MODE_NONE);
      }
 
    EINA_LIST_FOREACH(key_list, l, res)