aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-20 14:32:21 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-20 14:32:21 +0900
commit0b3e861b1624eb9ff4b488724add8d01eb90bab2 (patch)
tree0fbe2a469d8ddcecd500338da694a5b3997a0128
parentc4d50e105fd1204bdf6cac88300d667c1af3d682 (diff)
Remove lm_release API
This is not used anymore Change-Id: Ied69e28159f7b57f6bf36d8697d11c606a621248 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-rw-r--r--src/app.cpp99
-rw-r--r--src/app.hpp4
2 files changed, 0 insertions, 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<void(LayoutState const &nl)> 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<std::string, struct compositor::rect> area2size;
};