forked from enlightenment/efl
canvas layer: find the top item for only valids.
In some case, top layer doesn't have valid objects, That case, we must find and return top object in the next layer.
This commit is contained in:
parent
3ca52b7a1a
commit
052f562c42
|
@ -400,8 +400,9 @@ _evas_canvas_object_top_get(const Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
|
|||
list = EINA_INLIST_GET(e->layers);
|
||||
if (!list) return NULL;
|
||||
|
||||
layer = (Evas_Layer *) list->last;
|
||||
if (!layer) return NULL;
|
||||
//just in case if layer has no valid objects in the list.
|
||||
EINA_INLIST_REVERSE_FOREACH(list, layer)
|
||||
if (layer->objects) break;
|
||||
|
||||
list = EINA_INLIST_GET(layer->objects);
|
||||
if (!list) return NULL;
|
||||
|
|
Loading…
Reference in New Issue