and now focus works right! excellent.

SVN revision: 36969
This commit is contained in:
Carsten Haitzler 2008-10-22 12:08:39 +00:00
parent fc392751dc
commit f6c143674f
3 changed files with 9 additions and 22 deletions

View File

@ -731,9 +731,8 @@ my_bt_13(void *data, Evas_Object *obj, void *event_info)
elm_box_pack_end(bx, bx2);
evas_object_show(bx2);
// FIXME: HACK! not exposed! (should expose some later?)
elm_widget_focus_set(en, 1);
// FIXME: not exported
elm_widget_focus_set(win, 1);
evas_object_show(win);
}
@ -850,11 +849,10 @@ my_bt_14(void *data, Evas_Object *obj, void *event_info)
elm_box_pack_end(bx, bx2);
evas_object_show(bx2);
// FIXME: HACK! not exposed! (should expose some later?)
elm_widget_focus_set(en, 1);
evas_object_resize(win, 320, 300);
// FIXME: not exported
elm_widget_focus_set(win, 1);
evas_object_show(win);
}
@ -948,11 +946,10 @@ my_bt_15(void *data, Evas_Object *obj, void *event_info)
elm_box_pack_end(bx, bx2);
evas_object_show(bx2);
// FIXME: HACK! not exposed! (should expose some later?)
elm_widget_focus_set(np, 1);
evas_object_resize(win, 320, 300);
// FIXME: not exported
elm_widget_focus_set(win, 1);
evas_object_show(win);
}

View File

@ -46,7 +46,7 @@ static void
_on_focus_hook(void *data, Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
elm_widget_focus_set(wd->entry, 1);
elm_widget_focus_steal(wd->entry);
}
static char *

View File

@ -62,18 +62,8 @@ _sub_obj_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Smart_Data *sd = data;
Evas_Object *op, *op2;
op = elm_widget_parent_get(obj);
while (op)
{
op2 = elm_widget_parent_get(op);
if (!op2) break;
op = op2;
}
printf("focus off %p\n", op);
if (op) elm_widget_focused_object_clear(op);
printf("focus %p\n", sd->obj);
elm_widget_focus_set(sd->obj, 0);
elm_widget_focus_steal(sd->obj);
}
/* externally accessible functions */