evas_events: fix searching logic to find objects can receive events.
authorHosang Kim <hosang12.kim@samsung.com>
Sat, 10 Dec 2016 12:01:33 +0000 (21:01 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 2 Jan 2017 07:25:23 +0000 (16:25 +0900)
1. _evas_event_object_list_raw_in_get() API is designed to search objects
list from last. But sometimes it is not working.
2. If proxy source is set, event_passes_through is not checked.
event_passes_through is respected regardless of proxy source.

refer to:
https://phab.enlightenment.org/rEFL30d98fa1bd3be621897d6240f26801b2a53c427d
Change-Id: I1dffc30e3920441a8065d61437abaa7013da61d0

src/lib/evas/canvas/evas_events.c

index 41caf91..ac21cf0 100644 (file)
@@ -58,7 +58,7 @@ _evas_event_object_list_raw_in_get(Evas *eo_e, Eina_List *in,
    int inside;
 
    if (!list) return in;
-   for (obj = _EINA_INLIST_CONTAINER(obj, list);
+   for (obj = _EINA_INLIST_CONTAINER(obj, eina_inlist_last(list));
         obj;
         obj = _EINA_INLIST_CONTAINER(obj, EINA_INLIST_GET(obj)->prev))
      {
@@ -68,9 +68,9 @@ _evas_event_object_list_raw_in_get(Evas *eo_e, Eina_List *in,
              *no_rep = 1;
              return in;
           }
+        if (evas_event_passes_through(eo_obj, obj)) continue;
         if (!source)
           {
-             if (evas_event_passes_through(eo_obj, obj)) continue;
              if (evas_object_is_source_invisible(eo_obj, obj)) continue;
           }
         if ((obj->delete_me == 0) &&