app/api: add demo_activate_surface() api_binding
[staging/windowmanager.git] / src / layers.cpp
index b5ce2ed..6eae48a 100644 (file)
@@ -71,6 +71,11 @@ struct result<struct layer_map> to_layer_map(nlohmann::json const &j) {
          }
       }
 
+      auto msi = j.find("main_surface");
+      if (msi != j.end()) {
+         stl.main_surface = get<int>((*msi)["surface_id"]);
+      }
+
       // Check lookup
       auto jtests = j.value("tests", json());