From 0b3e861b1624eb9ff4b488724add8d01eb90bab2 Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Wed, 20 Jun 2018 14:32:21 +0900 Subject: Remove lm_release API This is not used anymore Change-Id: Ied69e28159f7b57f6bf36d8697d11c606a621248 Signed-off-by: Kazumasa Mitsunari --- src/app.cpp | 99 ------------------------------------------------------------- src/app.hpp | 4 --- 2 files changed, 103 deletions(-) diff --git a/src/app.cpp b/src/app.cpp index ba64671..746a8ff 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -422,105 +422,6 @@ void App::stopTimer() } } -WMError App::lm_release(const struct WMAction &action) -{ - //auto const &surface_id = this->lookup_id(drawing_name); - WMError ret = WMError::LAYOUT_CHANGE_FAIL; - unsigned req_num = g_app_list.currentRequestNumber(); - auto const &surface_id = this->lookup_id(action.role.c_str()); - if (!surface_id) - { - HMI_SEQ_ERROR(req_num, "Surface does not exist"); - return ret; - } - - if (*surface_id == this->layers.main_surface) - { - HMI_SEQ_ERROR(req_num, "Cannot deactivate main_surface"); - return ret; - } - - auto o_state = *this->layers.get_layout_state(*surface_id); - - if (o_state == nullptr) - { - HMI_SEQ_ERROR(req_num, "Could not find layer for surface"); - return ret; - } - - struct LayoutState &state = *o_state; - - if (state.main == -1) - { - HMI_SEQ_ERROR(req_num, "No surface active"); - return ret; - } - - // Check against main_surface, main_surface_name is the configuration item. - if (*surface_id == this->layers.main_surface) - { - HMI_SEQ_DEBUG(req_num, "Refusing to deactivate main_surface %d", *surface_id); - //reply(nullptr); - return WMError::SUCCESS; - } - if ((state.main == *surface_id) && (state.sub == *surface_id)) - { - HMI_SEQ_ERROR(req_num, "Surface is not active"); - return ret; - } - - if (state.main == *surface_id) - { - if (state.sub != -1) - { - this->try_layout( - state, LayoutState{state.sub, -1}, [&](LayoutState const &nl) { - std::string sub = std::move(*this->lookup_name(state.sub)); - - this->deactivate(*surface_id); - this->surface_set_layout(state.sub); - state = nl; - - this->layout_commit(); - std::string str_area = - std::string(kNameLayoutNormal) + "." + std::string(kNameAreaFull); - compositor::rect area_rect = this->area_info[state.sub]; - this->emit_syncdraw(sub.c_str(), str_area.c_str(), - area_rect.x, area_rect.y, area_rect.w, area_rect.h); - this->enqueue_flushdraw(state.sub); - }); - } - else - { - this->try_layout(state, LayoutState{-1, -1}, [&](LayoutState const &nl) { - this->deactivate(*surface_id); - state = nl; - this->layout_commit(); - }); - } - } - else if (state.sub == *surface_id) - { - this->try_layout( - state, LayoutState{state.main, -1}, [&](LayoutState const &nl) { - std::string main = std::move(*this->lookup_name(state.main)); - - this->deactivate(*surface_id); - this->surface_set_layout(state.main); - state = nl; - - this->layout_commit(); - std::string str_area = - std::string(kNameLayoutNormal) + "." + std::string(kNameAreaFull); - compositor::rect area_rect = this->area_info[state.main]; - this->emit_syncdraw(main.c_str(), str_area.c_str(), - area_rect.x, area_rect.y, area_rect.w, area_rect.h); - this->enqueue_flushdraw(state.main); - }); - } - return WMError::SUCCESS; -} - WMError App::doTransition(unsigned req_num) { HMI_SEQ_DEBUG(req_num, "check policy"); diff --git a/src/app.hpp b/src/app.hpp index a6608e0..14dbca3 100644 --- a/src/app.hpp +++ b/src/app.hpp @@ -292,10 +292,6 @@ struct App struct LayoutState const &new_layout, std::function apply); - // The following function is temporary. - // Then will be removed when layermanager is finished - WMError lm_release(const struct WMAction &action); - private: std::unordered_map area2size; }; -- cgit 1.2.3-korg