From af1b212d5af5b22051f1cd54028eb8f7e6a2297b Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Fri, 1 Jun 2018 00:02:22 +0900 Subject: Change wmClientContext Change-Id: I1fca8d68a20e2bb6a6efc6d70b4ec9a762d523c9 Signed-off-by: Kazumasa Mitsunari --- src/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 60f8164..ef07e26 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -34,9 +34,11 @@ extern "C" typedef struct wmClientCtxt { std::string name; - wmClientCtxt(const char *appName) + std::string role; + wmClientCtxt(const char *appName, const char* appRole) { name = appName; + role = role; } } wmClientCtxt; @@ -191,7 +193,7 @@ static void cbRemoveClientCtxt(void *data) } HMI_DEBUG("wm", "remove app %s", ctxt->name.c_str()); // Lookup surfaceID and remove it because App is dead. - auto pSid = g_afb_instance->app.id_alloc.lookup(ctxt->name.c_str()); + auto pSid = g_afb_instance->app.id_alloc.lookup(ctxt->role.c_str()); if (pSid) { auto sid = *pSid; @@ -245,7 +247,7 @@ void windowmanager_requestsurface(afb_req req) noexcept if (isFirstReq) { - wmClientCtxt *ctxt = new wmClientCtxt(a_drawing_name); + wmClientCtxt *ctxt = new wmClientCtxt(afb_req_get_application_id(req), a_drawing_name); HMI_DEBUG("wm", "create session for %s", ctxt->name.c_str()); afb_req_session_set_LOA(req, 1); afb_req_context_set(req, ctxt, cbRemoveClientCtxt); -- cgit 1.2.3-korg