const char *style;
unsigned int focus_order;
Eina_Bool focus_order_on_calc;
-
+
int child_drag_x_locked;
int child_drag_y_locked;
Eina_Bool drag_x_locked : 1;
Eina_Bool drag_y_locked : 1;
-
+
Eina_Bool can_focus : 1;
Eina_Bool child_can_focus : 1;
Eina_Bool focused : 1;
_sub_obj_mouse_down(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
{
Evas_Object *o = obj;
- do
+ do
{
if (_elm_widget_is(o)) break;
o = evas_object_smart_parent_get(o);
_elm_widget_type_clear(void)
{
const char **ptr;
-
+
EINA_LIST_FREE(widtypes, ptr)
{
eina_stringshare_del(*ptr);
{
if (sd2->parent_obj == obj)
return;
- elm_widget_sub_object_del(sd2->parent_obj, sobj);
+ if (sd2->parent_obj)
+ elm_widget_sub_object_del(sd2->parent_obj, sobj);
sd2->parent_obj = obj;
if (!sd->child_can_focus && (_is_focusable(sobj)))
sd->child_can_focus = EINA_TRUE;
if (data)
{
if (data == obj) return;
- evas_object_event_callback_del(sobj, EVAS_CALLBACK_DEL,
+ evas_object_event_callback_del(sobj, EVAS_CALLBACK_DEL,
_sub_obj_del);
}
}
}
else
sd->subobjs = eina_list_remove(sd->subobjs, sobj);
- evas_object_event_callback_del_full(sobj, EVAS_CALLBACK_DEL,
+ evas_object_event_callback_del_full(sobj, EVAS_CALLBACK_DEL,
_sub_obj_del, sd);
evas_object_smart_callback_call(obj, "sub-object-del", sobj);
}
{
parent = elm_widget_parent_get(parent);
sd = evas_object_smart_data_get(parent);
- if (elm_widget_focus_get(sd->resize_obj))
- {
- elm_widget_focused_object_clear(sd->resize_obj);
- }
- else
+ if ((sd->resize_obj) && (elm_widget_focus_get(sd->resize_obj)))
+ elm_widget_focused_object_clear(sd->resize_obj);
+ else
{
const Eina_List *l;
Evas_Object *child;
do
{
- parent_obj = sd->parent_obj;
- child_obj = sd->obj;
+ parent_obj = sd->parent_obj;
+ if ((!parent_obj) || (!_elm_widget_is(parent_obj))) break;
sd = evas_object_smart_data_get(parent_obj);
-
- if ((!parent_obj) || (!sd) || (!_elm_widget_is(parent_obj))) break;
+ if (!sd) break;
+ child_obj = sd->obj;
evas_object_geometry_get(parent_obj, &px, &py, NULL, NULL);
evas_object_geometry_get(child_obj, &cx, &cy, NULL, NULL);
elm_widget_style_set(Evas_Object *obj, const char *style)
{
API_ENTRY return;
-
+
if (eina_stringshare_replace(&sd->style, style))
elm_widget_theme(obj);
}
{
const Eina_List *l;
Evas_Object *child, *ret, *best;
-
+
API_ENTRY return NULL;
if (!evas_object_visible_get(obj)) return NULL;
best = NULL;
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;
}
Evas_Object *top;
Evas_Object *newest = NULL;
unsigned int newest_focus_order = 0;
-
+
INTERNAL_ENTRY;
if (!sd->focused) return;