and now focus works right! excellent.
authorCarsten Haitzler <raster@rasterman.com>
Wed, 22 Oct 2008 12:08:39 +0000 (12:08 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Wed, 22 Oct 2008 12:08:39 +0000 (12:08 +0000)
SVN revision: 36969

src/bin/test.c
src/lib/elc_notepad.c
src/lib/elm_widget.c

index 7fa4ebb..1c8ba46 100644 (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);
 }
 
index 848ecd8..a42756b 100644 (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 *
index 1136fae..d125756 100644 (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 */