}
g_rec_mutex_unlock(&krt->grab_key_mutex);
- // Top position grab must need a focus surface.
- if (surface_focus)
+ // Top position grab must need a focus client.
+ if (ec_focus)
{
g_rec_mutex_lock(&krt->grab_key_mutex);
Eina_List *top_ptr_list = e_keyrouter_hardkeys_list_get(krt->HardKeys, keycode, TIZEN_KEYROUTER_MODE_TOPMOST);
{
if (key_node_data)
{
- if ((EINA_FALSE == krt->isWindowStackChanged) && (surface_focus == key_node_data->surface))
+ if ((EINA_FALSE == krt->isWindowStackChanged) &&
+ (surface_focus && surface_focus == key_node_data->surface))
{
_e_keyrouter_send_key_event(type, key_node_data->surface, NULL, ev, dev, key_node_data->focused,
TIZEN_KEYROUTER_MODE_TOPMOST);
- _e_keyrouter_log_key_event(key_event_log_type, "TOPMOST (TOP_POSITION)",
+ _e_keyrouter_log_key_event(key_event_log_type, "TOPMOST (TOP & FOCUS)",
ev->keycode,
key_node_data->focused,
key_node_data->status,