diff options
-rw-r--r-- | src/main.cpp | 8 |
1 files 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); |