forked from enlightenment/efl
efl_ui_win: make it a focus manager
Added a focusmanager with the window itself as the root.
This commit is contained in:
parent
97265254e6
commit
9aa7c63b2f
|
@ -164,6 +164,8 @@ struct _Efl_Ui_Win_Data
|
|||
|
||||
Evas_Object *main_menu;
|
||||
|
||||
Efl_Ui_Focus_Manager *manager;
|
||||
|
||||
struct
|
||||
{
|
||||
const char *name;
|
||||
|
@ -5214,11 +5216,16 @@ _efl_ui_win_efl_object_finalize(Eo *obj, Efl_Ui_Win_Data *_pd)
|
|||
}
|
||||
|
||||
EOLIAN static Eo *
|
||||
_efl_ui_win_efl_object_constructor(Eo *obj, Efl_Ui_Win_Data *_pd EINA_UNUSED)
|
||||
_efl_ui_win_efl_object_constructor(Eo *obj, Efl_Ui_Win_Data *pd)
|
||||
{
|
||||
/* Do nothing. */
|
||||
/* XXX: We are calling the constructor chain from the finalizer. It's
|
||||
* really bad and hacky. Needs fixing. */
|
||||
pd->manager = efl_add(EFL_UI_FOCUS_MANAGER_CLASS, NULL,
|
||||
efl_ui_focus_manager_root_set(efl_added, obj)
|
||||
);
|
||||
|
||||
efl_composite_attach(obj, pd->manager);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ enum Efl.Ui.Win.Move_Resize_Mode
|
|||
class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window,
|
||||
Elm.Interface.Atspi_Component, Elm.Interface.Atspi_Widget_Action,
|
||||
Efl.Container, Efl.Input.State, Efl.Input.Interface, Efl.Screen,
|
||||
Efl.Gfx.Size.Hint, Efl.Text, Efl.Config.Global, Efl.Part)
|
||||
Efl.Gfx.Size.Hint, Efl.Text, Efl.Config.Global, Efl.Part, Efl.Ui.Focus.Manager )
|
||||
{
|
||||
[[Efl UI window class]]
|
||||
legacy_prefix: elm_win;
|
||||
|
|
Loading…
Reference in New Issue