diff options
author | Marcus Fritzsch <marcus_fritzsch@mentor.com> | 2017-06-08 15:00:55 +0200 |
---|---|---|
committer | Marcus Fritzsch <marcus_fritzsch@mentor.com> | 2017-08-08 17:24:00 +0200 |
commit | 90e562cd013333084f455257edaf43c0b2258e28 (patch) | |
tree | 5672960243f1d62821bea506a29774bb84d47d21 /src/main.cpp | |
parent | db95653246560c24ad3c8cb224b3d9321b50af0a (diff) |
hooked up genivi::surface and layer
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/main.cpp b/src/main.cpp index 0c010ea..1d92338 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -12,14 +12,8 @@ struct conn { std::vector<std::unique_ptr<wl::output>> outputs; std::unique_ptr<genivi::controller> c; - - ~conn(); }; -conn::~conn() { - this->outputs.clear(); -} - int main(int argc, char **argv) { lognotice("WinMan ver. %s", WINMAN_VERSION_STRING); @@ -27,25 +21,27 @@ int main(int argc, char **argv) { fatal("Environment variable XDG_RUNTIME_DIR not set"); auto d = std::make_unique<wl::display>(); - if (!d->d) + if (!d->ok()) fatal("Could not connect to compositor"); struct conn c = {}; - d->r->add_global_handler("ivi_controller", [&](wl_registry *r, uint32_t name, uint32_t v) { - c.c = std::make_unique<genivi::controller>(r, name, v); - }); + d->r->add_global_handler( + "ivi_controller", [&](wl_registry *r, uint32_t name, uint32_t v) { + c.c = std::make_unique<genivi::controller>(r, name, v); + }); - d->r->add_global_handler("wl_output", [&](wl_registry *r, uint32_t name, uint32_t v) { - c.outputs.emplace_back(std::make_unique<wl::output>(r, name, v)); - }); + d->r->add_global_handler( + "wl_output", [&](wl_registry *r, uint32_t name, uint32_t v) { + c.outputs.emplace_back(std::make_unique<wl::output>(r, name, v)); + }); // First level objects d->roundtrip(); // Second level objects d->roundtrip(); // Third level objects - /* wl_display_roundtrip(c.d); */ + d->roundtrip(); if (!c.c) fatal("ivi_controller global not available"); |