forked from enlightenment/efl
elementary/elm_scroller.c : For checking focus next object, focus_direcion_get function should be changed to focus_next_get function. If there is no focus next object, focus_direction_get will be executed by focus_next_get.
This commit is contained in:
parent
cc4a41e641
commit
2920eda9e5
|
@ -151,31 +151,22 @@ _elm_scroller_smart_event(Eo *obj, void *_pd, va_list *list)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Evas_Object *tmp = NULL;
|
Eina_Bool r = EINA_FALSE;
|
||||||
double degree = 0.0, weight = 0.0;
|
|
||||||
void *(*list_data_get)(const Eina_List *list);
|
|
||||||
|
|
||||||
list_data_get = eina_list_data_get;
|
|
||||||
|
|
||||||
if ((!strcmp(ev->key, "Left")) ||
|
if ((!strcmp(ev->key, "Left")) ||
|
||||||
(!strcmp(ev->key, "KP_Left")))
|
(!strcmp(ev->key, "KP_Left")))
|
||||||
degree = 270.0;
|
r = elm_widget_focus_next_get(obj, ELM_FOCUS_LEFT, &new_focus);
|
||||||
else if ((!strcmp(ev->key, "Right")) ||
|
else if ((!strcmp(ev->key, "Right")) ||
|
||||||
(!strcmp(ev->key, "KP_Right")))
|
(!strcmp(ev->key, "KP_Right")))
|
||||||
degree = 90.0;
|
r = elm_widget_focus_next_get(obj, ELM_FOCUS_RIGHT, &new_focus);
|
||||||
else if ((!strcmp(ev->key, "Up")) ||
|
else if ((!strcmp(ev->key, "Up")) ||
|
||||||
(!strcmp(ev->key, "KP_Up")))
|
(!strcmp(ev->key, "KP_Up")))
|
||||||
degree = 0.0;
|
r = elm_widget_focus_next_get(obj, ELM_FOCUS_UP, &new_focus);
|
||||||
else if ((!strcmp(ev->key, "Down")) ||
|
else if ((!strcmp(ev->key, "Down")) ||
|
||||||
(!strcmp(ev->key, "KP_Down")))
|
(!strcmp(ev->key, "KP_Down")))
|
||||||
degree = 180.0;
|
r = elm_widget_focus_next_get(obj, ELM_FOCUS_DOWN, &new_focus);
|
||||||
|
|
||||||
if (elm_widget_focus_list_direction_get
|
if (r && new_focus)
|
||||||
(obj, current_focus, can_focus_list, list_data_get, degree,
|
|
||||||
&tmp, &weight))
|
|
||||||
new_focus = tmp;
|
|
||||||
|
|
||||||
if (new_focus)
|
|
||||||
{
|
{
|
||||||
Evas_Coord l_x = 0;
|
Evas_Coord l_x = 0;
|
||||||
Evas_Coord l_y = 0;
|
Evas_Coord l_y = 0;
|
||||||
|
|
Loading…
Reference in New Issue