check focus reset after comp input ungrab

This commit is contained in:
Mike Blumenkrantz 2014-02-20 11:40:30 -05:00
parent 63d6153d86
commit 4bf4fb69ed
1 changed files with 10 additions and 0 deletions

View File

@ -1748,6 +1748,8 @@ EAPI void
e_comp_ungrab_input(E_Comp *c, Eina_Bool mouse, Eina_Bool kbd)
{
Ecore_Window mwin = 0, kwin = 0;
Eina_List *l;
E_Client *ec;
mouse = !!mouse;
kbd = !!kbd;
@ -1763,6 +1765,14 @@ e_comp_ungrab_input(E_Comp *c, Eina_Bool mouse, Eina_Bool kbd)
e_grabinput_release(mwin, kwin);
evas_event_feed_mouse_out(c->evas, 0, NULL);
evas_event_feed_mouse_in(c->evas, 0, NULL);
if (e_client_focused_get()) return;
EINA_LIST_FOREACH(e_client_focus_stack_get(), l, ec)
if (ec->desk && ec->desk->visible && (!ec->iconic))
{
if (ec->comp->input_key_grabs || ec->comp->input_mouse_grabs) break;
evas_object_focus_set(ec->frame, 1);
break;
}
}
EAPI void