efl_ui_widget: do not execute up handler when on destruction

otherwise we would cause an error.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10846
This commit is contained in:
Marcel Hollerbach 2019-12-09 21:51:02 +01:00 committed by Cedric BAIL
parent 4982da6327
commit 7d1463124a
1 changed files with 4 additions and 2 deletions

View File

@ -691,7 +691,8 @@ _obj_mouse_up(void *data,
Evas_Event_Mouse_Up *ev = event_info;
if (sd->still_in && (ev->flags == EVAS_BUTTON_NONE) &&
(sd->focus_move_policy == ELM_FOCUS_MOVE_POLICY_CLICK))
(sd->focus_move_policy == ELM_FOCUS_MOVE_POLICY_CLICK) &&
!efl_invalidated_get(data))
elm_widget_focus_mouse_up_handle(evas_object_widget_parent_find(obj));
sd->still_in = EINA_FALSE;
@ -704,7 +705,8 @@ _obj_mouse_in(void *data,
void *event_info EINA_UNUSED)
{
ELM_WIDGET_DATA_GET(data, sd);
if (sd->focus_move_policy == ELM_FOCUS_MOVE_POLICY_IN)
if (sd->focus_move_policy == ELM_FOCUS_MOVE_POLICY_IN &&
!efl_invalidated_get(data))
elm_widget_focus_mouse_up_handle(evas_object_widget_parent_find(obj));
}