fileman - don't add cbs to a fwin window that doesnt exist

less ERR noise.
This commit is contained in:
Carsten Haitzler 2019-01-09 18:23:19 +00:00
parent 2e2d26ec43
commit e493891151
1 changed files with 15 additions and 6 deletions

View File

@ -757,8 +757,11 @@ _e_fwin_icon_popup_handler(void *data)
evas_object_hide(fwin->popup);
E_FREE_FUNC(fwin->popup, evas_object_del);
}
evas_object_event_callback_del(fwin->win, EVAS_CALLBACK_MOUSE_IN, (Evas_Object_Event_Cb)_e_fwin_icon_popup_handler);
evas_object_event_callback_del(fwin->win, EVAS_CALLBACK_MOUSE_OUT, (Evas_Object_Event_Cb)_e_fwin_icon_popup_handler);
if (fwin->win)
{
evas_object_event_callback_del(fwin->win, EVAS_CALLBACK_MOUSE_IN, (Evas_Object_Event_Cb)_e_fwin_icon_popup_handler);
evas_object_event_callback_del(fwin->win, EVAS_CALLBACK_MOUSE_OUT, (Evas_Object_Event_Cb)_e_fwin_icon_popup_handler);
}
E_FREE_LIST(fwin->popup_handlers, ecore_event_handler_del);
if (fwin->over_file) eina_stringshare_del(fwin->over_file);
fwin->over_file = NULL;
@ -803,8 +806,11 @@ _e_fwin_free(E_Fwin *fwin)
}
if (fwin->popup_timer) ecore_timer_del(fwin->popup_timer);
fwin->popup_timer = NULL;
evas_object_event_callback_del(fwin->win, EVAS_CALLBACK_MOUSE_IN, (Evas_Object_Event_Cb)_e_fwin_icon_popup_handler);
evas_object_event_callback_del(fwin->win, EVAS_CALLBACK_MOUSE_OUT, (Evas_Object_Event_Cb)_e_fwin_icon_popup_handler);
if (fwin->win)
{
evas_object_event_callback_del(fwin->win, EVAS_CALLBACK_MOUSE_IN, (Evas_Object_Event_Cb)_e_fwin_icon_popup_handler);
evas_object_event_callback_del(fwin->win, EVAS_CALLBACK_MOUSE_OUT, (Evas_Object_Event_Cb)_e_fwin_icon_popup_handler);
}
E_FREE_LIST(fwin->popup_handlers, ecore_event_handler_del);
if (fwin->spring_parent) fwin->spring_parent->spring_child = NULL;
if (fwin->win)
@ -975,8 +981,11 @@ _e_fwin_icon_mouse_in(void *data, Evas_Object *obj EINA_UNUSED, void *event_info
#ifndef HAVE_WAYLAND_ONLY
if (!fwin->popup_handlers)
{
evas_object_event_callback_add(fwin->win, EVAS_CALLBACK_MOUSE_IN, (Evas_Object_Event_Cb)_e_fwin_icon_popup_handler, fwin);
evas_object_event_callback_add(fwin->win, EVAS_CALLBACK_MOUSE_OUT, (Evas_Object_Event_Cb)_e_fwin_icon_popup_handler, fwin);
if (fwin->win)
{
evas_object_event_callback_add(fwin->win, EVAS_CALLBACK_MOUSE_IN, (Evas_Object_Event_Cb)_e_fwin_icon_popup_handler, fwin);
evas_object_event_callback_add(fwin->win, EVAS_CALLBACK_MOUSE_OUT, (Evas_Object_Event_Cb)_e_fwin_icon_popup_handler, fwin);
}
if (e_comp_util_has_x())
E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_X_EVENT_XDND_POSITION, (Ecore_Event_Handler_Cb)_e_fwin_icon_popup_handler, fwin);
E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_EVENT_MOUSE_BUTTON_DOWN, (Ecore_Event_Handler_Cb)_e_fwin_icon_popup_handler, fwin);