X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fapp.cpp;h=9e27ea82f03c1bcb9af58db1d1f847b6dcd8d3c6;hb=2cb77378b47dfda8032f13f1c0c66d4f389d628c;hp=e64b2489335052305583233700905dd811a89c58;hpb=6d0e22de7814f4fbf2201d84d207eec570e821cd;p=apps%2Fagl-service-windowmanager.git diff --git a/src/app.cpp b/src/app.cpp index e64b248..9e27ea8 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -414,7 +414,7 @@ void App::set_timer(){ CLOCK_REALTIME, time(NULL) + TIME_OUT, 0, processTimerHandler, this); if (ret < 0) { - HMI_ERROR("wm", "Can't set timer"); + HMI_ERROR("wm", "Could't set timer"); } } else @@ -425,6 +425,15 @@ void App::set_timer(){ } } +void App::stop_timer(){ + unsigned seq = app_list.currentSequenceNumber(); + HMI_SEQ_DEBUG(seq, "Timer stop"); + int rc = sd_event_source_set_enabled(timer_ev_src, SD_EVENT_OFF); + if(rc < 0){ + HMI_SEQ_ERROR(seq, "Timer stop failed"); + } +} + bool App::do_allocate_window_resource(unsigned request_seq) { /* @@ -459,7 +468,7 @@ bool App::do_allocate_window_resource(unsigned request_seq) return ret; } -void App::lm_layout_change(unsigned req, const char* drawing_name) +void App::lm_layout_change(unsigned req_num, const char* drawing_name) { auto const &surface_id = this->lookup_id(drawing_name); auto layer_id = this->layers.get_layer_id(*surface_id); @@ -604,7 +613,7 @@ void App::lm_layout_change(unsigned req, const char* drawing_name) } } -const char* App::check_surface_exist(unsigned req, const char* drawing_name) +const char* App::check_surface_exist(unsigned req_num, const char* drawing_name) { auto const &surface_id = this->lookup_id(drawing_name); if (!surface_id) @@ -711,7 +720,7 @@ void App::api_deactivate_surface(char const *appid, char const *drawing_name, co std::string id = appid; - if(app_list.contains(id)){ + if(!app_list.contains(id)){ reply("app doesn't request 'requestSurface' yet"); return; }