X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=inline;f=src%2Fapp.cpp;h=00f391a52dfc6330c2425147634148b329902210;hb=f985291576affb4a2054e81ed34e7ff57ea50922;hp=58fc0362daf379f6c1fce0253cd7e02701042e29;hpb=2f79d6f7733993d4eb5e9bdaf29add9d303f18c5;p=apps%2Fagl-service-windowmanager.git diff --git a/src/app.cpp b/src/app.cpp index 58fc036..00f391a 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -46,7 +46,7 @@ extern "C" namespace wm { -const unsigned TIME_OUT = 1000000UL; /* 1s */ +const unsigned TIME_OUT = 10000000UL; /* 10s */ /* DrawingArea name used by "{layout}.{area}" */ const char kNameLayoutNormal[] = "normal"; @@ -134,6 +134,11 @@ void App::timerHandler() } } +void App::removeClient(const std::string &appid){ + HMI_DEBUG("wm", "Remove clinet %s from list", appid.c_str()); + app_list.removeClient(appid); +} + /** * App Impl */ @@ -1097,28 +1102,7 @@ void App::surface_removed(uint32_t surface_id) { HMI_DEBUG("wm", "surface_id is %u", surface_id); - // We cannot normally deactivate the main_surface, so be explicit - // about it: - if (int(surface_id) == this->layers.main_surface) - { - this->deactivate_main_surface(); - } - else - { - auto drawing_name = this->lookup_name(surface_id); - if (drawing_name) - { - std::string appid = ""; - /* auto = lookUpClient(surface_id); - appid = client->appID(); - - */ - this->api_deactivate_surface(appid.c_str(), drawing_name->c_str(), [](const char *) {}); - } - } - - this->id_alloc.remove_id(surface_id); - this->layers.remove_surface(surface_id); + app_list.removeSurface(surface_id); } void App::emit_activated(char const *label) @@ -1187,7 +1171,8 @@ result App::api_request_surface(char const *appid, char const *drawing_name // add client into the db std::string appid_str(appid); std::string role(drawing_name); - app_list.addClient(appid_str, role); + //app_list.addClient(appid_str, role); + app_list.addClient(appid_str, *lid, id, role); return Ok(id); }