win: Fix legacy win type name

Window constructor is hijacked by the finalize method, which messes up
the normal order of operations. As a result, the legacy type name for a
window object was "elm_widget" rather than "elm_win".

This fixes a crash in E (as it checks the legacy type name to verify an
object's type).

See D5748
This commit is contained in:
Jean-Philippe Andre 2018-01-25 11:43:31 +09:00
parent 1eb4d1311e
commit 426ccba6bd
2 changed files with 3 additions and 3 deletions

View File

@ -8627,9 +8627,9 @@ _efl_ui_win_legacy_class_constructor(Efl_Class *klass)
}
EOLIAN static Eo *
_efl_ui_win_legacy_efl_object_constructor(Eo *obj, void *pd EINA_UNUSED)
_efl_ui_win_legacy_efl_object_finalize(Eo *obj, void *pd EINA_UNUSED)
{
obj = efl_constructor(efl_super(obj, EFL_UI_WIN_LEGACY_CLASS));
obj = efl_finalize(efl_super(obj, EFL_UI_WIN_LEGACY_CLASS));
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
return obj;
}

View File

@ -4,6 +4,6 @@ class Efl.Ui.Win_Legacy (Efl.Ui.Win, Efl.Ui.Legacy)
data: null;
implements {
class.constructor;
Efl.Object.constructor;
Efl.Object.finalize;
}
}