diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/app.cpp b/src/app.cpp index 353557e..461ac35 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -113,19 +113,27 @@ App::App(wl::display *d) 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()); } } |