From 9aa7c63b2f2e4b4a0e2ce8628340dcbe22a33f1e Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Fri, 4 Nov 2016 17:44:37 +0100 Subject: [PATCH] efl_ui_win: make it a focus manager Added a focusmanager with the window itself as the root. --- src/lib/elementary/efl_ui_win.c | 9 ++++++++- src/lib/elementary/efl_ui_win.eo | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index c1d3f07..2bd0b93 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -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; } diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index 90147dc..2e743af 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -97,7 +97,7 @@ enum Efl.Ui.Win.Indicator_Type legacy: efl_ui_win_indicator; type_unknown, [[Unknown indicator type]] - bg_opaque, [[The icon of indicator is opaque, the background of indicator is also opaque. + bg_opaque, [[The icon of indicator is opaque, the background of indicator is also opaque. The content of window is located the end of indicator. The area of indicator and window content are not overlapped]] bg_transparent, [[The icon of indicator is opaque, but the background is transparent. @@ -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; @@ -871,7 +871,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window, } move_resize_start { [[Start moving or resizing the window. - + The user can request the display server to start moving or resizing the window by combining modes from @Efl.Ui.Win.Move_Resize_Mode. This API can only be called if none of the following conditions is @@ -886,7 +886,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window, 1. Pointer (mouse or touch) down event, 2. @.move_resize_start called only once with a supported mode, 3. Pointer (mouse or touch) up event. - + If a pointer up event occurs after calling the function, it automatically ends the window move and resize operation. -- 2.7.4