fprintf(log_fl, " ----- Focus Window Info -----\n");
if (ec_focus)
{
- surface_focus = e_keyrouter_util_get_surface_from_eclient(ec_focus);
+ surface_focus = e_comp_wl_client_surface_get(ec_focus);
if (surface_focus)
{
wc_focus = wl_resource_get_client(surface_focus);
Eina_List *shared_ptr_list = NULL;
ec_focus = e_client_focused_get();
- surface_focus = e_keyrouter_util_get_surface_from_eclient(ec_focus);
+ surface_focus = e_comp_wl_client_surface_get(ec_focus);
if (!_e_keyrouter_is_key_grabbed(ev->keycode))
{
if (shared_ptr_list)
{
need_shared:
+ if (ec_focus != e_client_focused_get())
+ {
+ KLWRN("focused ec is changed from (%p). no key events to focus client and shared", ec_focus);
+ surface_focus = NULL;
+ }
res = _e_keyrouter_send_key_events_focus(type, surface_focus, ev, dev, &delivered_surface);
if (delivered_surface)
{
return EINA_FALSE;
}
+ if (!surface_focus) return res;
+
pid = e_keyrouter_util_get_pid(NULL, surface_focus);
cmd = e_keyrouter_util_cmd_get_from_pid(pid);
pname = e_keyrouter_util_process_name_get_from_cmd(cmd);
return;
}
-struct wl_resource *
-e_keyrouter_util_get_surface_from_eclient(E_Client *client)
-{
- if (!client || !client->comp_data) return NULL;
-
- return client->comp_data->wl_surface;
-}
-
int
e_keyrouter_util_get_pid(struct wl_client *client, struct wl_resource *surface)
{
EINTERN int e_keyrouter_find_key_in_list(struct wl_resource *surface, struct wl_client *wc, uint32_t key);
EINTERN Eina_Bool e_keyrouter_process_key_event(void *event, int type);
-EINTERN struct wl_resource *e_keyrouter_util_get_surface_from_eclient(E_Client *client);
EINTERN int e_keyrouter_util_get_pid(struct wl_client *client, struct wl_resource *surface);
EINTERN char *e_keyrouter_util_cmd_get_from_pid(int pid);
EINTERN char *e_keyrouter_util_process_name_get_from_cmd(char *cmd);