elementary: make sure windows are not born orfan and properly have at least a main loop as parent.
This commit is contained in:
parent
1fcb33f422
commit
08c9f99134
|
@ -8259,6 +8259,7 @@ elm_win_window_id_get(const Evas_Object *obj)
|
|||
if (!evas_object_smart_type_check_ptr(obj, MY_CLASS_NAME_LEGACY))
|
||||
{
|
||||
Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
|
||||
if (!ee) return NULL;
|
||||
return ecore_evas_window_get(ee);
|
||||
}
|
||||
|
||||
|
@ -8654,7 +8655,7 @@ elm_win_add(Evas_Object *parent, const char *name, Efl_Ui_Win_Type type)
|
|||
default: break;
|
||||
}
|
||||
|
||||
return elm_legacy_add(klass, parent,
|
||||
return elm_legacy_add(klass, parent,
|
||||
efl_ui_win_name_set(efl_added, name),
|
||||
efl_ui_win_type_set(efl_added, type));
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ _elm_part_initialize(Eo *proxy, Eo *obj, const char *part)
|
|||
static inline Eo *
|
||||
ELM_PART_IMPLEMENT(const Efl_Class *part_klass, const Eo *obj, const char *part)
|
||||
{
|
||||
return efl_add(part_klass, NULL,
|
||||
return efl_add(part_klass, (Eo *) obj,
|
||||
_elm_part_initialize(efl_added, (Eo *) obj, part));
|
||||
}
|
||||
|
||||
|
|
|
@ -823,7 +823,7 @@ _elm_widget_sub_object_redirect_to_top(Evas_Object *obj, Evas_Object *sobj)
|
|||
}
|
||||
|
||||
#define elm_legacy_add(k, p, ...) ({ \
|
||||
efl_add(k, p, efl_canvas_object_legacy_ctor(efl_added), ##__VA_ARGS__); })
|
||||
efl_add(k, p ? p : efl_main_loop_get(), efl_canvas_object_legacy_ctor(efl_added), ##__VA_ARGS__); })
|
||||
|
||||
static inline Eo *
|
||||
elm_widget_resize_object_get(const Eo *obj)
|
||||
|
|
Loading…
Reference in New Issue