summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
ac062c3)
TODO:
Couldn't return to Home when tap shortcut key
Change-Id: I53399452b82c838fd034ef1c7eece1deecaa2701
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-void App::surface_set_layout(int surface_id, optional<int> sub_surface_id)
+void App::surface_set_layout(int surface_id, const std::string& area)
{
if (!this->controller->surface_exists(surface_id))
{
{
if (!this->controller->surface_exists(surface_id))
{
uint32_t layer_id = *o_layer_id;
auto const &layer = this->layers.get_layer(layer_id);
uint32_t layer_id = *o_layer_id;
auto const &layer = this->layers.get_layer(layer_id);
- auto rect = layer.value().rect;
+ auto rect = this->layers.getAreaSize(area);
auto &s = this->controller->surfaces[surface_id];
int x = rect.x;
auto &s = this->controller->surfaces[surface_id];
int x = rect.x;
deact_sub.appid = g_app_list.getAppID(state.sub, main, &found);
if (!found)
{
deact_sub.appid = g_app_list.getAppID(state.sub, main, &found);
if (!found)
{
- HMI_SEQ_DEBUG(req, "sub surface ddoesn't exist");
+ HMI_SEQ_DEBUG(req, "sub surface doesn't exist");
return WMError::NOT_REGISTERED;
}
deact_sub.visible = task_visible;
deact_sub.end_draw_finished = end_draw_finished;
return WMError::NOT_REGISTERED;
}
deact_sub.visible = task_visible;
deact_sub.end_draw_finished = end_draw_finished;
- HMI_SEQ_DEBUG(req, "sub surface ddoesn't exist");
+ HMI_SEQ_DEBUG(req, "sub surface doesn't exist");
g_app_list.setAction(req, deact_sub);
}
}
g_app_list.setAction(req, deact_sub);
}
}
WMError App::setSurfaceSize(unsigned surface, const std::string &area)
{
WMError App::setSurfaceSize(unsigned surface, const std::string &area)
{
- this->surface_set_layout(surface);
+ this->surface_set_layout(surface, area);
return WMError::SUCCESS;
}
return WMError::SUCCESS;
}
WMError App::visibilityChange(const WMAction &action)
{
WMError App::visibilityChange(const WMAction &action)
{
+ HMI_SEQ_DEBUG(g_app_list.currentRequestNumber(), "Change visibility");
+ if(!g_app_list.contains(action.appid)){
+ return WMError::NOT_REGISTERED;
+ }
auto client = g_app_list.lookUpClient(action.appid);
unsigned surface = client->surfaceID(action.role);
if(surface == 0)
auto client = g_app_list.lookUpClient(action.appid);
unsigned surface = client->surfaceID(action.role);
if(surface == 0)
WMError App::changeCurrentState(unsigned req_num)
{
WMError App::changeCurrentState(unsigned req_num)
{
- HMI_SEQ_DEBUG(req_num, "Change current layout status");
+ HMI_SEQ_DEBUG(req_num, "Change current layout state");
bool trigger_found = false, action_found = false;
auto trigger = g_app_list.getRequest(req_num, &trigger_found);
auto actions = g_app_list.getActions(req_num, &action_found);
bool trigger_found = false, action_found = false;
auto trigger = g_app_list.getRequest(req_num, &trigger_found);
auto actions = g_app_list.getActions(req_num, &action_found);
- //auto client = g_app_list.lookUpClient(trigger.appid);
- //auto pCurState = *this->layers.get_layout_state((int)client->surfaceID(trigger.role));
- //pCurState = state;
if (!trigger_found || !action_found)
{
HMI_SEQ_ERROR(req_num, "Action not found");
if (!trigger_found || !action_found)
{
HMI_SEQ_ERROR(req_num, "Action not found");
// Layout state reset
struct LayoutState reset_state{-1, -1};
// Layout state reset
struct LayoutState reset_state{-1, -1};
- HMI_SEQ_DEBUG(req_num."Reset layout state");
+ HMI_SEQ_DEBUG(req_num,"Reset layout state");
for (const auto &action : actions)
{
for (const auto &action : actions)
{
+ if(!g_app_list.contains(action.appid)){
+ return WMError::NOT_REGISTERED;
+ }
auto client = g_app_list.lookUpClient(trigger.appid);
auto pCurState = *this->layers.get_layout_state((int)client->surfaceID(trigger.role));
auto client = g_app_list.lookUpClient(trigger.appid);
auto pCurState = *this->layers.get_layout_state((int)client->surfaceID(trigger.role));
- *pCurState = reset_state;
+ if(pCurState == nullptr)
+ {
+ HMI_SEQ_ERROR(req_num, "Counldn't find current status");
+ continue;
+ }
+ pCurState->main = reset_state.main;
+ pCurState->sub = reset_state.sub;
- for(const auto &action : actions)
+ HMI_SEQ_DEBUG(req_num, "Change state");
+ for (const auto &action : actions)
{
auto client = g_app_list.lookUpClient(action.appid);
{
auto client = g_app_list.lookUpClient(action.appid);
- auto pLayerCurState = *this->layers.get_layout_state((int)client->surfaceID(trigger.role));
- int surface = -1;
- if(action.visible != TaskVisible::INVISIBLE)
+ auto pLayerCurState = *this->layers.get_layout_state((int)client->surfaceID(action.role));
+ if (pLayerCurState == nullptr)
- surface = (int)client->surfaceID(action.role);
+ HMI_SEQ_ERROR(req_num, "Counldn't find current status");
+ continue;
if (action.visible != TaskVisible::INVISIBLE)
{
if (action.visible != TaskVisible::INVISIBLE)
{
+ surface = (int)client->surfaceID(action.role);
+ HMI_SEQ_INFO(req_num, "Change %s state visible area : %s", action.role.c_str(), action.area.c_str());
// visible == true -> layout changes
if(action.area == "normal.full" || action.area == "split.main")
{
// visible == true -> layout changes
if(action.area == "normal.full" || action.area == "split.main")
{
- void surface_set_layout(int surface_id, optional<int> sub_surface_id = nullopt);
+ void surface_set_layout(int surface_id, const std::string& area = "");
void layout_commit();
// TMC WM Events to clients
void layout_commit();
// TMC WM Events to clients