display{d},
controller{},
outputs(),
- layouts(), // load_layout("../layout.json").unwrap()),
- surface2layer(load_layer_ids("../ids.json").unwrap()) {
- // layouts(load_layout("../layout.json").unwrap()) {
+ layouts(),
+ surface2layer() {
assert(g_app == nullptr);
g_app = this;
- try {
+ {
+ auto l = load_layer_ids("../ids.json");
+ if (l.is_ok()) {
+ this->surface2layer = l.unwrap();
+ } else {
+ logerror("%s", l.err().value());
+ }
+ }
+
+ {
auto l = load_layout("../layout.json");
- if (l.is_err()) {
- logerror("Coult not load layout configuration: %s", l.err().value());
+ if (l.is_ok()) {
+ this->layouts = l.unwrap();
+ } else {
+ logerror("%s", l.err().value());
}
- } catch (std::exception &e) {
- logerror("Coult not load layout configuration: %s", e.what());
}
}