ensure lifetime for wl client focus timer

fixes some focus-out crashing
This commit is contained in:
Mike Blumenkrantz 2016-05-03 20:24:54 -04:00
parent 69370250d1
commit 32cf7162ed
1 changed files with 5 additions and 3 deletions

View File

@ -522,11 +522,12 @@ _e_comp_wl_evas_cb_focus_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob
{
E_Client *ec = data;
E_FREE_FUNC(ec->comp_data->on_focus_timer, ecore_timer_del);
/* lower client priority */
if (!e_object_is_del(data))
_e_comp_wl_client_priority_normal(ec);
{
_e_comp_wl_client_priority_normal(ec);
E_FREE_FUNC(ec->comp_data->on_focus_timer, ecore_timer_del);
}
_e_comp_wl_keyboard_leave(ec);
}
@ -2245,6 +2246,7 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec)
wl_signal_emit(&ec->comp_data->destroy_signal, &ec->comp_data->surface);
_e_comp_wl_surface_state_finish(&ec->comp_data->pending);
E_FREE_FUNC(ec->comp_data->on_focus_timer, ecore_timer_del);
/* The resource destroy callback will walk the state->frames list,
* so move the list to a temporary first.