elementary/elm_widget : When elm_win sets as disabled,
authorwoohyun <woohyun@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 9 Jul 2011 05:13:35 +0000 (05:13 +0000)
committerwoohyun <woohyun@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 9 Jul 2011 05:13:35 +0000 (05:13 +0000)
elm_widget_focus_cycle does nothing. So should be separated as sepcial
case.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@61169 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_widget.c

index 0b8af76..9a65f01 100644 (file)
@@ -1809,15 +1809,21 @@ elm_widget_disabled_set(Evas_Object *obj,
    if (sd->focused)
      {
         Evas_Object *o, *parent;
-
         parent = obj;
-        for (;;)
+        o = elm_widget_parent_get(parent);
+        if (!o)
+          elm_widget_focused_object_clear(parent);
+        else
           {
-             o = elm_widget_parent_get(parent);
-             if (!o) break;
              parent = o;
+             for (;;)
+               {
+                  o = elm_widget_parent_get(parent);
+                  if (!o) break;
+                  parent = o;
+               }
+             elm_widget_focus_cycle(parent, ELM_FOCUS_NEXT);
           }
-        elm_widget_focus_cycle(parent, ELM_FOCUS_NEXT);
      }
    if (sd->disable_func) sd->disable_func(obj);
 }