From 90e562cd013333084f455257edaf43c0b2258e28 Mon Sep 17 00:00:00 2001 From: Marcus Fritzsch Date: Thu, 8 Jun 2017 15:00:55 +0200 Subject: hooked up genivi::surface and layer Signed-off-by: Marcus Fritzsch --- src/main.cpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'src/main.cpp') 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> outputs; std::unique_ptr 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(); - 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(r, name, v); - }); + d->r->add_global_handler( + "ivi_controller", [&](wl_registry *r, uint32_t name, uint32_t v) { + c.c = std::make_unique(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(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(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"); -- cgit 1.2.3-korg