summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-06-23 14:47:39 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-08 17:24:00 +0200
commit3bfefb8cc00bdf007ec1b99ce61cebf973e12b92 (patch)
treea1cc05ac9fa0df47a731823747828d828ec17a2e
parent331b84526ada3d98d207ae3ddcc4892b2868870f (diff)
wayland: initialize layer members
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
-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,