ecore-evas-wayland: Add support for setting window stack mode

This patch adds support for updating ecore_wl2_window stack mode when
the ecore_evas_layer_set is called.

"#divergence"

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2017-06-15 11:39:27 -04:00
parent 1359fc9e5f
commit a3cf0d3a54
2 changed files with 47 additions and 0 deletions

View File

@ -1455,6 +1455,46 @@ _ecore_evas_wl_common_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int la
if (input) ecore_wl2_input_pointer_set(input, NULL, hot_x, hot_y);
}
static void
_ecore_evas_wl_common_layer_update(Ecore_Evas *ee)
{
Ecore_Evas_Engine_Wl_Data *wdata;
wdata = ee->engine.data;
if (!wdata) return;
if (ee->prop.layer < 3)
{
if ((wdata->stack.above) || (!wdata->stack.below))
{
wdata->stack.above = EINA_FALSE;
wdata->stack.below = EINA_TRUE;
ecore_wl2_window_stack_mode_set(wdata->win,
ECORE_WL2_WINDOW_STACK_BELOW);
}
}
else if (ee->prop.layer > 5)
{
if ((!wdata->stack.above) || (wdata->stack.below))
{
wdata->stack.above = EINA_TRUE;
wdata->stack.below = EINA_FALSE;
ecore_wl2_window_stack_mode_set(wdata->win,
ECORE_WL2_WINDOW_STACK_ABOVE);
}
}
else
{
if ((wdata->stack.above) || (wdata->stack.below))
{
wdata->stack.above = EINA_FALSE;
wdata->stack.below = EINA_FALSE;
ecore_wl2_window_stack_mode_set(wdata->win,
ECORE_WL2_WINDOW_STACK_NONE);
}
}
}
static void
_ecore_evas_wl_common_layer_set(Ecore_Evas *ee, int layer)
{
@ -1465,6 +1505,7 @@ _ecore_evas_wl_common_layer_set(Ecore_Evas *ee, int layer)
if (layer < 1) layer = 1;
else if (layer > 255) layer = 255;
ee->prop.layer = layer;
_ecore_evas_wl_common_layer_update(ee);
_ecore_evas_wl_common_state_update(ee);
}

View File

@ -57,6 +57,12 @@ struct _Ecore_Evas_Engine_Wl_Data
Ecore_Job *manual_mode_job;
} wm_rot;
struct
{
Eina_Bool above : 1;
Eina_Bool below : 1;
} stack;
Eina_Bool dragging : 1;
Eina_Bool sync_done : 1;
Eina_Bool defer_show : 1;