elementary/elm_widget - added minor exceptions.
authorChunEon Park <hermet@hermet.pe.kr>
Fri, 11 Mar 2011 11:44:23 +0000 (11:44 +0000)
committerChunEon Park <hermet@hermet.pe.kr>
Fri, 11 Mar 2011 11:44:23 +0000 (11:44 +0000)
SVN revision: 57688

src/lib/elm_widget.c

index 6c448fd..46c0603 100644 (file)
@@ -1589,11 +1589,12 @@ elm_widget_focus_steal(Evas_Object *obj)
      {
        parent = elm_widget_parent_get(parent);
        sd = evas_object_smart_data_get(parent);
-       if (elm_widget_focus_get(sd->resize_obj))
+        if (sd->resize_obj)
           {
-             elm_widget_focused_object_clear(sd->resize_obj);
+             if (elm_widget_focus_get(sd->resize_obj))
+               elm_widget_focused_object_clear(sd->resize_obj);
           }
-       else
+        else
          {
             const Eina_List *l;
             Evas_Object *child;
@@ -2537,7 +2538,11 @@ _newest_focus_order_get(Evas_Object *obj, unsigned int *newest_focus_order, Eina
         if (!ret) continue;
         best = ret;
      }
-   if ((can_focus_only) && (!elm_widget_can_focus_get(best))) return NULL;
+   if (can_focus_only)
+     {
+        if ((!best) || (!elm_widget_can_focus_get(best)))
+         return NULL;
+     }
    return best;
 }