aboutsummaryrefslogtreecommitdiffstats
path: root/src/wayland.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wayland.cpp')
-rw-r--r--src/wayland.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/wayland.cpp b/src/wayland.cpp
index 098ee47..b644313 100644
--- a/src/wayland.cpp
+++ b/src/wayland.cpp
@@ -309,8 +309,14 @@ constexpr struct ivi_controller_layer_listener layer_listener = {
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);
}
@@ -514,8 +520,10 @@ void controller::surface_configuration(uint32_t id, int32_t width,
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,