diff options
Diffstat (limited to 'src/wayland.cpp')
-rw-r--r-- | src/wayland.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wayland.cpp b/src/wayland.cpp index a512979..3983da8 100644 --- a/src/wayland.cpp +++ b/src/wayland.cpp @@ -514,14 +514,14 @@ void controller::surface_configuration(uint32_t id, int32_t width, logdebug("genivi::surface %s @ %p w %i h %i", __func__, this->proxy, width, height); struct surface *s = this->surfaces[id].get(); - bool center = s->size.w != width && s->size.h != height; + 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) - auto const s = c->surfaces.find(id); - if (s != c->surfaces.end()) - s->second->set_destination_rectangle( - 800 / 2 - width / 2, 600 / 2 - height / 2, width, height); - add_task("fullscreen surface", [id, width, height](struct controller *c) { + add_task("fullscreen surface", [id](struct controller *c) { + c->surfaces[id]->set_destination_rectangle(0, 0, c->output_size.w, c->output_size.h); + c->surfaces[id]->set_visibility(1); + c->layers[100]->add_surface(c->surfaces[id].get()); + c->layers[100]->set_visibility(1); }); } |