{
E_Client *topmost;
- if (_e_comp_wl_subsurface_data_get(ec))
- {
- 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;
- _e_comp_wl_subsurface_check_below_bg_rectangle(topmost);
- return;
- }
+ topmost = e_comp_wl_topmost_parent_get(ec);
+ if (!topmost)
+ return;
- if (ec->argb)
- {
- if (ec->comp_data->sub.below_obj)
- {
- ELOGF("COMP", "argb ec doesn't need below bg rectangle.", ec);
- _e_comp_wl_subsurface_below_obj_destroy(ec);
- }
- return;
- }
+ if ((!topmost->comp_data) ||
+ (e_object_is_del(E_OBJECT(topmost))))
+ return;
- if (!ec->comp_data->sub.below_obj)
+ if (_e_comp_wl_subsurface_data_get(topmost))
+ return;
+
+ if (topmost->comp_data->sub.below_obj)
{
- if ((ec->comp_data->sub.below_list) ||
- (ec->comp_data->sub.below_list_pending) ||
- (_e_comp_wl_subsurface_video_has(ec)))
+ if ((topmost->argb) ||
+ ((!topmost->comp_data->sub.below_list) &&
+ (!topmost->comp_data->sub.below_list_pending) &&
+ (!_e_comp_wl_subsurface_video_has(topmost))))
{
- ELOGF("COMP", "it has below subsurfaces and video.", ec);
- _e_comp_wl_subsurface_below_obj_create(ec);
+ ELOGF("COMP", "below_obj becomes useless. argb(%d)",
+ topmost, topmost->argb);
+ _e_comp_wl_subsurface_below_obj_destroy(topmost);
}
}
else
{
- /* 'below_obj' has to be removed if it becomes useless. */
- if ((!ec->comp_data->sub.below_list) &&
- (!ec->comp_data->sub.below_list_pending) &&
- (!_e_comp_wl_subsurface_video_has(ec)))
+ if ((topmost->comp_data->sub.below_list) ||
+ (topmost->comp_data->sub.below_list_pending) ||
+ (_e_comp_wl_subsurface_video_has(topmost)))
{
- ELOGF("COMP", "it doesn't have any below subsurfaces and video.",
- ec);
- _e_comp_wl_subsurface_below_obj_destroy(ec);
+ ELOGF("COMP", "it has below subsurfaces and video.", topmost);
+ _e_comp_wl_subsurface_below_obj_create(topmost);
}
}
}