From: Jean-Philippe Andre Date: Thu, 31 Aug 2017 07:58:02 +0000 (+0900) Subject: win: Drop calls to lower when using the EO API X-Git-Tag: submit/sandbox/upgrade/efl120/20180319.053334~2821 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4d6bb96e8d379b69243247fbf5bf00e4f386133b;p=platform%2Fupstream%2Fefl.git win: Drop calls to lower when using the EO API Note: The distinction is made on how the window was created, not on which API is used (evas_object_lower or efl_gfx_stack_lower or elm_win_lower). Ref T5322 --- diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index d4bea99..8a6e487 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -824,6 +824,7 @@ _elm_win_obj_intercept_raise(void *data, Evas_Object *obj EINA_UNUSED) static void _elm_win_obj_intercept_lower(void *data, Evas_Object *obj EINA_UNUSED) { + // Note: This is probably not necessary anymore (Win ignores lower) ELM_WIN_DATA_GET(data, sd); TRAP(sd, lower); } @@ -5557,6 +5558,18 @@ elm_win_raise(Eo *obj) } EOLIAN static void +_efl_ui_win_efl_gfx_stack_lower(Eo *obj, Efl_Ui_Win_Data *pd EINA_UNUSED) +{ + // Do nothing: in X we could request to stack lower but that has been abused + // and transformed into a kind of "iconify". As a consequence, lower is + // not allowed in EO land. + if (!elm_widget_is_legacy(obj)) return; + + // Legacy support... + elm_win_lower(obj); +} + +EOLIAN static void _efl_ui_win_center(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Bool h, Eina_Bool v) { int win_w, win_h, screen_x, screen_y, screen_w, screen_h, nx, ny; diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index cc05d53..4ca1000 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -842,6 +842,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window, Efl.Gfx.size { set; } Efl.Gfx.Stack.raise; [[Places the window at the top of the stack, so that it's not covered by any other window.]] + Efl.Gfx.Stack.lower; [[This action is ignored by the Window.]] Elm.Widget.focus_direction; Elm.Widget.focus_next_manager_is; Elm.Widget.focus_direction_manager_is;