layer::layer(uint32_t i, struct controller *c) : layer(i, 0, 0, c) {}
layer::layer(uint32_t i, int32_t w, int32_t h, struct controller *c)
- : wayland_proxy(ivi_controller_layer_create(c->proxy, i, w, h)),
- controlled_entity(c, i) {
+ : wayland_proxy(ivi_controller_layer_create(c->proxy, i, w, h))
+ , controlled_entity(c, i)
+ , dst_rect{}
+ , src_rect{}
+ , size{}
+ , orientation{}
+ , visibility{}
+ , opacity{} {
ivi_controller_layer_add_listener(this->proxy, &layer_listener, this);
}
logdebug("genivi::surface %s @ %p w %i h %i", __func__, this->proxy, width,
height);
auto &s = this->surfaces[id];
+
bool center = int(s->size.w) != int(width) && int(s->size.h) != int(height);
s->size = size{uint32_t(width), uint32_t(height)};
+
if (center)
add_task("fullscreen surface", [id](struct controller *c) {
c->surfaces[id]->set_destination_rectangle(0, 0, c->output_size.w,
uint32_t lid = id == 0x16180 ? 1000 : 100;
c->layers[lid]->add_surface(c->surfaces[id].get());
c->layers[lid]->set_visibility(1);
+ logdebug("Surface %u now fullscreen on layer %u", id, lid);
});
}
void controller::surface_destroyed(uint32_t id) {
logdebug("genivi::surface %s @ %p", __func__, this->proxy);
+ this->surfaces.erase(id);
}
void controller::surface_content(uint32_t id, int32_t content_state) {