e_keyrouter: Support a API to send event_surface 88/239188/1
authorjeon <jhyuni.kang@samsung.com>
Wed, 22 Jul 2020 10:30:16 +0000 (19:30 +0900)
committerjeon <jhyuni.kang@samsung.com>
Wed, 22 Jul 2020 10:30:16 +0000 (19:30 +0900)
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 d271929c9597551000510090d01c80e5f112d55c..dd38752e2e2f6278f66b927448848f4b082c10b1 100644 (file)
@@ -5167,6 +5167,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)
      {
@@ -5215,6 +5216,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 bba5e54bf8df9d12e3dad530fa1aa7d506713c3c..cac1ef6279e27f01997f16a66b41b7bc49e3f71a 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 5bba5937c841123be7668c3d17d1d5c97d0da321..c775f3f05f62e72ae88bd624b400eadeab105700 100644 (file)
@@ -130,3 +130,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)