typedef void (*E_Comp_Object_Stack_Func)(Evas_Object *obj, Evas_Object *stack);
+static Eina_Bool
+_e_comp_object_is_pending(E_Client *ec)
+{
+ E_Client *topmost;
+
+ if (!ec) return EINA_FALSE;
+
+ topmost = e_comp_wl_topmost_parent_get(ec);
+
+ return (topmost) ? topmost->layer_pending : EINA_FALSE;
+}
+
static void
_e_comp_intercept_stack_helper(E_Comp_Object *cw, Evas_Object *stack, E_Comp_Object_Stack_Func stack_cb)
{
Evas_Object *o = stack;
Eina_Bool raising = stack_cb == evas_object_stack_above;
- if ((cw->ec->layer_block) || (cw->ec->layer_pending))
+ /* We should consider topmost's layer_pending for subsurface */
+ if ((cw->ec->layer_block) || _e_comp_object_is_pending(cw->ec))
{
- if (cw->ec->layer_pending)
+ if (_e_comp_object_is_pending(cw->ec))
e_comp_object_layer_update(cw->smart_obj,
raising? stack : NULL,
raising? NULL : stack);
/* assume someone knew what they were doing during client init */
if (cw->ec->new_client)
layer = cw->ec->layer;
- else if ((cw2) && (cw2->ec->layer_pending))
+ else if ((cw2) && _e_comp_object_is_pending(cw2->ec))
layer = cw2->ec->layer;
else
layer = evas_object_layer_get(stack);
_e_comp_object_layers_add(cw, NULL, NULL, 0);
/* find new object for stacking if cw2 is on state of layer_pending */
- if ((cw2) && (cw2->ec->layer_pending))
+ if ((cw2) && _e_comp_object_is_pending(cw2->ec))
{
E_Client *new_stack = NULL, *current_ec = NULL;
current_ec = cw2->ec;
current_ec = new_stack;
if (new_stack == cw->ec) continue;
if (new_stack->layer != cw2->ec->layer) break;
- if (!new_stack->layer_pending) break;
+ if (!_e_comp_object_is_pending(new_stack)) break;
}
if ((new_stack) && (new_stack->layer == cw2->ec->layer))
stack = new_stack->frame;
current_ec = new_stack;
if (new_stack == cw->ec) continue;
if (new_stack->layer != cw2->ec->layer) break;
- if (!new_stack->layer_pending) break;
+ if (!_e_comp_object_is_pending(new_stack)) break;
}
if ((new_stack) && (new_stack->layer == cw2->ec->layer))
stack = new_stack->frame;
ec->comp_data->height_from_viewport = height;
}
-static E_Client*
-_e_comp_wl_topmost_parent_get(E_Client *ec)
+EINTERN E_Client*
+e_comp_wl_topmost_parent_get(E_Client *ec)
{
E_Client *parent = NULL;
EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp)
evas_object_show(tmp->frame);
- topmost = _e_comp_wl_topmost_parent_get(ec);
+ topmost = e_comp_wl_topmost_parent_get(ec);
if (topmost == ec && (ec->comp_data->sub.list || ec->comp_data->sub.below_list))
_e_comp_wl_subsurface_show(ec);
EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp)
evas_object_hide(tmp->frame);
- topmost = _e_comp_wl_topmost_parent_get(ec);
+ topmost = e_comp_wl_topmost_parent_get(ec);
if (topmost == ec && (ec->comp_data->sub.list || ec->comp_data->sub.below_list))
_e_comp_wl_subsurface_hide(ec);
return;
}
- topmost = _e_comp_wl_topmost_parent_get(ec);
+ topmost = e_comp_wl_topmost_parent_get(ec);
_e_comp_wl_subsurface_restack(topmost);
_e_comp_wl_subsurface_restack_bg_rectangle(topmost);
return EINA_FALSE;
invisible_parent = _e_comp_wl_subsurface_invisible_parent_get(ec);
- topmost = _e_comp_wl_topmost_parent_get(ec);
+ topmost = e_comp_wl_topmost_parent_get(ec);
/* if topmost is composited by compositor && if there is a invisible parent */
if (topmost->redirected && invisible_parent)
if (ec->comp_data->sub.below_obj) return;
if (ec->comp_data->sub.data)
{
- E_Client *topmost = _e_comp_wl_topmost_parent_get(ec);
+ E_Client *topmost = e_comp_wl_topmost_parent_get(ec);
if (!topmost || e_object_is_del(E_OBJECT(topmost)) || !topmost->comp_data) return;
if (topmost->comp_data->sub.data) return;
if (topmost->comp_data->sub.below_obj) return;
if (_e_comp_wl_surface_subsurface_order_commit(ec))
{
- E_Client *topmost = _e_comp_wl_topmost_parent_get(ec);
+ E_Client *topmost = e_comp_wl_topmost_parent_get(ec);
_e_comp_wl_subsurface_restack(topmost);
_e_comp_wl_subsurface_restack_bg_rectangle(topmost);
}
if (_e_comp_wl_surface_subsurface_order_commit(ec))
{
- E_Client *topmost = _e_comp_wl_topmost_parent_get(ec);
+ E_Client *topmost = e_comp_wl_topmost_parent_get(ec);
_e_comp_wl_subsurface_restack(topmost);
_e_comp_wl_subsurface_restack_bg_rectangle(topmost);
}