app/wayland: move surface setup as is to app controller hook
[staging/windowmanager.git] / src / app.cpp
index e28d8d0..3f62575 100644 (file)
@@ -219,6 +219,14 @@ int App::init_layout() {
 
 void App::surface_created(uint32_t surface_id) {
    DB("surface_id is " << surface_id);
+   this->controller->add_task("fullscreen surface", [surface_id](struct genivi::controller *c) {
+      auto &s = c->surfaces[surface_id];
+      s->set_destination_rectangle(0, 0, c->output_size.w, c->output_size.h);
+      s->set_visibility(1);
+      uint32_t lid = surface_id == 0x16180 ? 1000 : 100;
+      c->layers[lid]->add_surface(s.get());
+      logdebug("Surface %u now fullscreen on layer %u", surface_id, lid);
+   });
 }
 
 void App::surface_removed(uint32_t surface_id) {