raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=39af0d88aa7c84bd5a8f6cc9b5b94c5b045f93dd
commit 39af0d88aa7c84bd5a8f6cc9b5b94c5b045f93dd Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Mon Dec 19 15:39:36 2016 +0900 efl stack wins - add base property/boolean to indicate win is a base part of adding stacks... --- src/bin/elementary/test_win_stack.c | 1 + src/lib/ecore_x/Ecore_X.h | 3 ++- src/lib/elementary/efl_ui_win.c | 19 ++++++++++++++++++- src/lib/elementary/efl_ui_win.eo | 20 ++++++++++++++++++++ 4 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/bin/elementary/test_win_stack.c b/src/bin/elementary/test_win_stack.c index 2273c7a..72d8680 100644 --- a/src/bin/elementary/test_win_stack.c +++ b/src/bin/elementary/test_win_stack.c @@ -67,6 +67,7 @@ test_win_stack(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event Evas_Object *bg, *bx, *bt, *lb, *win; win = elm_win_add(NULL, "window-stack", ELM_WIN_BASIC); + elm_win_stack_base_set(win, EINA_TRUE); elm_win_title_set(win, "Window Stack"); elm_win_autodel_set(win, EINA_TRUE); diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h index 6654d78..f08d020 100644 --- a/src/lib/ecore_x/Ecore_X.h +++ b/src/lib/ecore_x/Ecore_X.h @@ -1382,7 +1382,8 @@ typedef enum _Ecore_X_Illume_Window_State typedef enum _Ecore_X_Stack_Type { ECORE_X_STACK_NONE = 0, - ECORE_X_STACK_STANDARD = 1, + ECORE_X_STACK_BASE = 1, + ECORE_X_STACK_STANDARD, ECORE_X_STACK_LAST } Ecore_X_Stack_Type; diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 4365017..7ae8bf6 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -258,6 +258,7 @@ struct _Efl_Ui_Win_Data Eina_Bool tmp_updating_hints : 1; Eina_Bool single_edje_content: 1; /* hack for E */ Eina_Bool shown : 1; + Eina_Bool stack_base : 1; }; struct _Input_Pointer_Iterator @@ -3151,7 +3152,10 @@ _elm_win_xwin_update(Efl_Ui_Win_Data *sd) if (win) { ecore_x_icccm_transient_for_set(sd->x.xwin, win); - ecore_x_e_stack_type_set(sd->x.xwin, ECORE_X_STACK_STANDARD); + if (sd->stack_base) + ecore_x_e_stack_type_set(sd->x.xwin, ECORE_X_STACK_BASE); + else + ecore_x_e_stack_type_set(sd->x.xwin, ECORE_X_STACK_STANDARD); } } else @@ -6157,6 +6161,19 @@ _efl_ui_win_stack_master_id_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) } EOLIAN static void +_efl_ui_win_stack_base_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Bool base) +{ + if (sd->shown) return; + sd->stack_base = !!base; +} + +EOLIAN static Eina_Bool +_efl_ui_win_stack_base_get(Eo *obj, Efl_Ui_Win_Data *sd) +{ + return sd->stack_base; +} + +EOLIAN static void _efl_ui_win_stack_pop_to_id(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd EINA_UNUSED, const char *id EINA_UNUSED) { // if in e (x11+wl), ask e to nuke all windows in stack above this diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index 4a73d96..886b14d 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -772,6 +772,26 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window, display.]] } } + @property stack_base { + set { + [[Set the stack base state of this window + + This is a boolean flag that determines if this window will + become the base of a stack at all. You must enable this + on a base (bottom of a window stack for things to work + correctly. + + This state should be set before a window is shown for the + first time and never changed again after that. + + @since 1.19]] + } + get {} + values { + base: bool; [[True if this is a stack base window, false + false otherwise.]] + } + } stack_pop_to_id { [[Pop (delete) all windows in the stack above this window. --
