app: use activate_surface() in surface_set_layout()
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>
Wed, 30 Aug 2017 12:46:29 +0000 (14:46 +0200)
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>
Mon, 4 Sep 2017 14:54:00 +0000 (16:54 +0200)
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
src/app.cpp

index 78dc7d9..4800d8c 100644 (file)
@@ -313,10 +313,15 @@ void App::surface_set_layout(uint32_t surface_id) {
    s->set_destination_rectangle(x, y, w, h);
 
    // XXX: The main_surface will be visible regardless
-   s->set_visibility(
-      surface_id == static_cast<unsigned>(this->layers.main_surface) ? 1 : 0);
+   //s->set_visibility(
+   //   surface_id == static_cast<unsigned>(this->layers.main_surface) ? 1 : 0);
    this->controller->layers[layer_id]->add_surface(s.get());
 
+   if (surface_id == static_cast<unsigned>(this->layers.main_surface)) {
+      logdebug("Activating main_surface (%d)", surface_id);
+      this->activate_surface(surface_id);
+   }
+
    logdebug("Surface %u now on layer %u with rect { %d, %d, %d, %d }",
             surface_id, layer_id, x, y, w, h);
 }