list/genlist/gengrid/toolbar: Fix - _nearest_visible_item_get() should always return an item.

Test Plan:
Bug:
- elementary_test->genlist/list/toolbar/gengrid Focus
- Resize the window to a state when no item is fully visible. only partially visible.
- Move Focus from outer widgets (Up/Down/Left/right buttons) to list/genlist/gengrid/toolbar.
- Focus goes away (size - 0). Reason: _nearest_visible_item_get returns NULL.

@fix

Reviewers: seoz, raster, woohyun

Reviewed By: raster

CC: seoz, nirajkr, anand.km

Differential Revision: https://phab.enlightenment.org/D696
This commit is contained in:
Amitesh Singh 2014-04-04 12:04:04 +09:00 committed by Carsten Haitzler (Rasterman)
parent 173df1d361
commit 1479664ec0
4 changed files with 4 additions and 4 deletions

View File

@ -2171,7 +2171,7 @@ _elm_gengrid_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *it)
return item;
}
}
return NULL;
return it;
}
EOLIAN static Eina_Bool

View File

@ -2808,7 +2808,7 @@ _elm_genlist_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *it)
return item;
}
}
return NULL;
return it;
}
EOLIAN static Eina_Bool

View File

@ -1201,7 +1201,7 @@ _elm_list_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *it)
return item;
}
}
return NULL;
return it;
}
EOLIAN static Eina_Bool

View File

@ -694,7 +694,7 @@ _elm_toolbar_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *it)
return item;
}
}
return NULL;
return it;
}
EOLIAN static Eina_Bool