EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp)
evas_object_show(tmp->frame);
+
+ if (ec->comp_data->sub.below_obj)
+ evas_object_show(ec->comp_data->sub.below_obj);
}
static void
EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp)
evas_object_hide(tmp->frame);
+
+ if (ec->comp_data->sub.below_obj)
+ evas_object_hide(ec->comp_data->sub.below_obj);
}
static void
y = ec->y + subc->comp_data->sub.data->position.y;
evas_object_move(subc->frame, x, y);
}
+
+ if (ec->comp_data->sub.below_obj)
+ evas_object_move(ec->comp_data->sub.below_obj, ec->x, ec->y);
}
static void
if (e_object_is_del(E_OBJECT(ec))) return;
/* return if ec isn't both a parent of a subsurface and a subsurface itself */
- if (!ec->comp_data->sub.list && !ec->comp_data->sub.below_list && !ec->comp_data->sub.data) return;
+ if (!ec->comp_data->sub.list && !ec->comp_data->sub.below_list && !ec->comp_data->sub.data)
+ {
+ if (ec->comp_data->sub.below_obj) _e_comp_wl_subsurface_restack(ec);
+ return;
+ }
if (ec->comp_data->sub.data)
parent = ec->comp_data->sub.data->parent;
ec->comp_data->shell.configure_send(ec->comp_data->shell.surface,
ec->comp->wl_comp_data->resize.edges,
ec->client.w, ec->client.h);
+
+ if (ec->comp_data->sub.below_obj)
+ evas_object_resize(ec->comp_data->sub.below_obj, ec->w, ec->h);
}
static void
ec->comp_data->mapped = EINA_FALSE;
}
}
-
- if (ec->comp_data->sub.below_obj && evas_object_visible_get(ec->comp_data->sub.below_obj))
- evas_object_hide(ec->comp_data->sub.below_obj);
}
else
{
ec->comp_data->mapped = EINA_TRUE;
}
}
-
- if (ec->comp_data->sub.below_obj && !evas_object_visible_get(ec->comp_data->sub.below_obj))
- evas_object_show(ec->comp_data->sub.below_obj);
}
if (state->new_attach || state->buffer_viewport.changed)
return EINA_FALSE;
}
+static void
+_e_comp_wl_subsurface_bg_evas_cb_resize(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
+{
+ E_Client *ec;
+
+ if (!(ec = data)) return;
+ if (e_object_is_del(E_OBJECT(ec))) return;
+ if (!ec->comp_data) return;
+
+ if (ec->comp_data->sub.below_obj)
+ evas_object_resize(ec->comp_data->sub.below_obj, ec->w, ec->h);
+}
+
static void
_e_comp_wl_subsurface_create_below_bg_rectangle(E_Client *ec)
{
- short layer = evas_object_layer_get(ec->frame);
+ short layer;
+
+ if (ec->comp_data->sub.below_obj) return;
ec->comp_data->sub.below_obj = evas_object_rectangle_add(ec->comp->evas);
EINA_SAFETY_ON_NULL_RETURN(ec->comp_data->sub.below_obj);
+ layer = evas_object_layer_get(ec->frame);
evas_object_layer_set(ec->comp_data->sub.below_obj, layer);
evas_object_render_op_set(ec->comp_data->sub.below_obj, EVAS_RENDER_COPY);
evas_object_color_set(ec->comp_data->sub.below_obj, 0x00, 0x00, 0x00, 0xff);
evas_object_move(ec->comp_data->sub.below_obj, ec->x, ec->y);
evas_object_resize(ec->comp_data->sub.below_obj, ec->w, ec->h);
evas_object_name_set(ec->comp_data->sub.below_obj, "below_bg_rectangle");
+
+ evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_RESIZE,
+ _e_comp_wl_subsurface_bg_evas_cb_resize, ec);
+
+ _e_comp_wl_subsurface_restack(ec);
}
static void
e_comp_shape_queue(ec->comp);
ec->need_shape_export = EINA_FALSE;
}
+
+ if (ec->argb && ec->frame && !e_util_strcmp("video", ec->icccm.window_role))
+ _e_comp_wl_subsurface_create_below_bg_rectangle(ec);
}
#if 0
}
}
- if (ec->comp_data->sub.below_obj && evas_object_visible_get(ec->comp_data->sub.below_obj))
- evas_object_hide(ec->comp_data->sub.below_obj);
}
else
{
ec->comp_data->mapped = EINA_TRUE;
}
}
-
- if (ec->comp_data->sub.below_obj && !evas_object_visible_get(ec->comp_data->sub.below_obj))
- evas_object_show(ec->comp_data->sub.below_obj);
}
return EINA_TRUE;