efl_ui_widget: do not execute up handler when on destruction
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Mon, 9 Dec 2019 20:51:02 +0000 (21:51 +0100)
committerJongmin Lee <jm105.lee@samsung.com>
Mon, 16 Dec 2019 03:26:45 +0000 (12:26 +0900)
otherwise we would cause an error.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10846

src/lib/elementary/efl_ui_widget.c

index 2856f37..d99a28c 100644 (file)
@@ -782,7 +782,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;
@@ -795,7 +796,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));
 }