diff options
author | Marcus Fritzsch <marcus_fritzsch@mentor.com> | 2017-06-29 16:07:05 +0200 |
---|---|---|
committer | Marcus Fritzsch <marcus_fritzsch@mentor.com> | 2017-08-08 17:24:00 +0200 |
commit | 22cf0bf96f4a94f5fbfec6f5dfc3adeb5b66e7ac (patch) | |
tree | 9cf2e21c7f87298706a682dc7176ba8f1663a439 /src | |
parent | 1c2a6b6e01836423ca4168cc3f067a113efe654b (diff) |
main: add wl_output proxy-to-id mapping in wl_output global handler
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index 52d6b32..3c8bc0a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -142,13 +142,19 @@ int main(int /*argc*/, char ** /*argv*/) { struct connection c {}; d.r.add_global_handler( + "wl_output", [&c](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( "ivi_controller", [&c](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", [&c](wl_registry *r, uint32_t name, uint32_t v) { - c.outputs.emplace_back(std::make_unique<wl::output>(r, name, v)); + // XXX: This protocol needs the output, so lets just add our mapping here... + c.c->add_proxy_to_id_mapping(c.outputs.back()->proxy.get(), + wl_proxy_get_id( + reinterpret_cast<struct wl_proxy *>( + c.outputs.back()->proxy.get()))); }); // First level objects |