}
}
+void App::removeClient(const std::string &appid){
+ HMI_DEBUG("wm", "Remove clinet %s from list", appid.c_str());
+ app_list.removeClient(appid);
+}
+
/**
* App Impl
*/
{
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)
// 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<int>(id);
}
// Do not use this function
//static int processTimerHandler(sd_event_source *s, uint64_t usec, void *userdata);
void timerHandler();
+ void removeClient(const std::string &appid);
private:
optional<int> lookup_id(char const *name);