main: set layer visibility in init_layout()
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>
Mon, 26 Jun 2017 14:38:40 +0000 (16:38 +0200)
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>
Tue, 8 Aug 2017 15:24:00 +0000 (17:24 +0200)
Also don't set layer visibility when adding surfaces.

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
src/main.cpp
src/wayland.cpp

index c343a66..60a243a 100644 (file)
@@ -100,6 +100,8 @@ void init_layout(struct conn &c) {
    // Set layers fullscreen
    l100->set_destination_rectangle(0, 0, o->width, o->height);
    l1k->set_destination_rectangle(0, 0, o->width, o->height);
+   l100->set_visibility(1);
+   l1k->set_visibility(1);
 
    // Add layers to screen
    s->set_render_order({100, 1000});
index c2c5cbe..4f2b026 100644 (file)
@@ -241,8 +241,7 @@ void controller::controller_surface(uint32_t id) {
                                                  c->output_size.h);
       c->surfaces[id]->set_visibility(1);
       uint32_t lid = id == 0x16180 ? 1000 : 100;
-      c->layers[lid]->add_surface(c->surfaces[id].get());
-      c->layers[lid]->set_visibility(1);
+      c->layers[lid]->add_surface(s.get());
       logdebug("Surface %u now fullscreen on layer %u", id, lid);
    });
 }