remove pip delete callback during pip free
fixes crash when unloading module while pips exist
This commit is contained in:
parent
24d4459e61
commit
267e84ca6d
19
src/pip.c
19
src/pip.c
|
@ -60,9 +60,19 @@ pips_edit(void)
|
||||||
e_comp_shape_queue();
|
e_comp_shape_queue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_pip_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
|
{
|
||||||
|
E_Client *ec = data;
|
||||||
|
eina_hash_del_by_key(pips, &ec->frame);
|
||||||
|
if (editing && (!eina_hash_population(pips)))
|
||||||
|
pips_noedit();
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pip_free(Pip *pip)
|
pip_free(Pip *pip)
|
||||||
{
|
{
|
||||||
|
evas_object_event_callback_del(pip->pip, EVAS_CALLBACK_DEL, _pip_del);
|
||||||
evas_object_del(pip->pip);
|
evas_object_del(pip->pip);
|
||||||
evas_object_del(pip->clip);
|
evas_object_del(pip->clip);
|
||||||
free(pip);
|
free(pip);
|
||||||
|
@ -287,15 +297,6 @@ _pip_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
action_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, (Ecore_Event_Handler_Cb)_pip_mouse_move, pip);
|
action_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, (Ecore_Event_Handler_Cb)_pip_mouse_move, pip);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_pip_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
|
||||||
E_Client *ec = data;
|
|
||||||
eina_hash_del_by_key(pips, &ec->frame);
|
|
||||||
if (editing && (!eina_hash_population(pips)))
|
|
||||||
pips_noedit();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_pip_delete(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSED)
|
_pip_delete(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSED)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue