diff --git a/src/bin/e_comp_canvas.c b/src/bin/e_comp_canvas.c index 6453674b7..97d6234fb 100644 --- a/src/bin/e_comp_canvas.c +++ b/src/bin/e_comp_canvas.c @@ -131,7 +131,7 @@ _key_down(int ctx, Ecore_Event_Key *ev) (!e_comp->screen->key_down) || (!e_comp->screen->key_down(ev))) && !e_bindings_key_down_event_handle(ctx, E_OBJECT(e_comp), ev) #ifdef HAVE_WAYLAND - && !e_comp_wl_key_down(ev) + && !e_comp_wl_key_down(ev, NULL) #endif ; } @@ -163,7 +163,7 @@ _key_up(int ctx, Ecore_Event_Key *ev) (!e_comp->screen->key_up) || (!e_comp->screen->key_up(ev))) && !e_bindings_key_up_event_handle(ctx, E_OBJECT(e_comp), ev) #ifdef HAVE_WAYLAND - && !e_comp_wl_key_up(ev) + && !e_comp_wl_key_up(ev, NULL) #endif ; } diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 9025ba8de..1575ad406 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -3304,9 +3304,8 @@ e_comp_wl_output_remove(const char *id) } EINTERN Eina_Bool -e_comp_wl_key_down(Ecore_Event_Key *ev) +e_comp_wl_key_down(Ecore_Event_Key *ev, E_Client *ec) { - E_Client *ec = NULL; uint32_t serial, *end, *k, keycode; if ((e_comp->comp_type != E_PIXMAP_TYPE_WL) || (ev->window != e_comp->ee_win)) return EINA_FALSE; @@ -3342,7 +3341,7 @@ e_comp_wl_key_down(Ecore_Event_Key *ev) if ((!e_client_action_get()) && (!e_comp->input_key_grabs) && (!e_menu_is_active())) { - ec = e_client_focused_get(); + if (!ec) ec = e_client_focused_get(); if (ec && ec->comp_data->surface && e_comp_wl->kbd.focused) { struct wl_resource *res; @@ -3361,9 +3360,8 @@ e_comp_wl_key_down(Ecore_Event_Key *ev) } EINTERN Eina_Bool -e_comp_wl_key_up(Ecore_Event_Key *ev) +e_comp_wl_key_up(Ecore_Event_Key *ev, E_Client *ec) { - E_Client *ec = NULL; uint32_t serial, *end, *k, keycode; struct wl_resource *res; Eina_List *l; @@ -3392,7 +3390,7 @@ e_comp_wl_key_up(Ecore_Event_Key *ev) if ((!e_client_action_get()) && (!e_comp->input_key_grabs) && (!e_menu_is_active())) { - ec = e_client_focused_get(); + if (!ec) ec = e_client_focused_get(); if (e_comp_wl->kbd.focused) { diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index 0ff222584..2aa12f2c0 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -408,8 +408,8 @@ E_API double e_comp_wl_idle_time_get(void); E_API Eina_Bool e_comp_wl_output_init(const char *id, const char *make, const char *model, int x, int y, int w, int h, int pw, int ph, unsigned int refresh, unsigned int subpixel, unsigned int transform, unsigned int num); E_API void e_comp_wl_output_remove(const char *id); -EINTERN Eina_Bool e_comp_wl_key_down(Ecore_Event_Key *ev); -EINTERN Eina_Bool e_comp_wl_key_up(Ecore_Event_Key *ev); +EINTERN Eina_Bool e_comp_wl_key_down(Ecore_Event_Key *ev, E_Client *ec); +EINTERN Eina_Bool e_comp_wl_key_up(Ecore_Event_Key *ev, E_Client *ec); E_API Eina_Bool e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t button_id, uint32_t state); E_API extern int E_EVENT_WAYLAND_GLOBAL_ADD;