forked from enlightenment/enlightenment
clean up client delete+unfocus
previously there were cases where client focus was not explicitly unset on delete, which resulted in expected client hooks not being called and minor inconveniences to occur
This commit is contained in:
parent
a466b92c8d
commit
cd2cde6477
|
@ -378,8 +378,6 @@ _e_client_revert_focus(E_Client *ec)
|
||||||
static void
|
static void
|
||||||
_e_client_free(E_Client *ec)
|
_e_client_free(E_Client *ec)
|
||||||
{
|
{
|
||||||
if (ec->focused)
|
|
||||||
e_client_focused_set(NULL);
|
|
||||||
e_comp_object_redirected_set(ec->frame, 0);
|
e_comp_object_redirected_set(ec->frame, 0);
|
||||||
e_comp_object_render_update_del(ec->frame);
|
e_comp_object_render_update_del(ec->frame);
|
||||||
|
|
||||||
|
@ -534,6 +532,7 @@ _e_client_del(E_Client *ec)
|
||||||
|
|
||||||
if (ec->focused)
|
if (ec->focused)
|
||||||
_e_client_revert_focus(ec);
|
_e_client_revert_focus(ec);
|
||||||
|
evas_object_focus_set(ec->frame, 0);
|
||||||
|
|
||||||
E_FREE_FUNC(ec->ping_poller, ecore_poller_del);
|
E_FREE_FUNC(ec->ping_poller, ecore_poller_del);
|
||||||
/* must be called before parent/child clear */
|
/* must be called before parent/child clear */
|
||||||
|
@ -3141,12 +3140,12 @@ e_client_focused_set(E_Client *ec)
|
||||||
e_client_unfullscreen(ec_unfocus);
|
e_client_unfullscreen(ec_unfocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* only send event/hook here if we're not being deleted */
|
_e_client_hook_call(E_CLIENT_HOOK_FOCUS_UNSET, ec_unfocus);
|
||||||
|
/* only send event here if we're not being deleted */
|
||||||
if ((!e_object_is_del(E_OBJECT(ec_unfocus))) &&
|
if ((!e_object_is_del(E_OBJECT(ec_unfocus))) &&
|
||||||
(e_object_ref_get(E_OBJECT(ec_unfocus)) > 0))
|
(e_object_ref_get(E_OBJECT(ec_unfocus)) > 0))
|
||||||
{
|
{
|
||||||
_e_client_event_simple(ec_unfocus, E_EVENT_CLIENT_FOCUS_OUT);
|
_e_client_event_simple(ec_unfocus, E_EVENT_CLIENT_FOCUS_OUT);
|
||||||
_e_client_hook_call(E_CLIENT_HOOK_FOCUS_UNSET, ec_unfocus);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1718,9 +1718,12 @@ _e_comp_smart_focus_in(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_comp_smart_focus_out(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
_e_comp_smart_focus_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
e_comp_object_signal_emit(obj, "e,state,unfocused", "e");
|
E_Comp_Object *cw = data;
|
||||||
|
|
||||||
|
if (!e_object_is_del(E_OBJECT(cw->ec)))
|
||||||
|
e_comp_object_signal_emit(obj, "e,state,unfocused", "e");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue