aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
};