+ HMI_SEQ_DEBUG(req_num, "Change current layout status");
+ bool found = false;
+ auto actions = g_app_list.getActions(req_num, &found);
+ if(!found)
+ {
+ HMI_SEQ_ERROR(req_num, "Action not found");
+ return WMError::LAYOUT_CHANGE_FAIL;
+ }
+
+ struct LayoutState state;
+ std::vector<std::string> areas;
+ bool state_change = false;
+
+ for(const auto &action : actions)
+ {
+ if(action.visible)
+ {
+ // visible == true -> layout changes
+ areas.push_back(action.area);
+ auto client = g_app_list.lookUpClient(action.appid);
+ if(action.area == "normal.full" || action.area == "split.main")
+ {
+ state.main = (int)client->surfaceID(action.role);
+ }
+ else if(action.role == "split.sub")
+ {
+ state.sub = (int)client->surfaceID(action.role);
+ }
+ state_change = true;
+ }
+ }
+
+ if(state_change)
+ {
+ auto trigger = g_app_list.getRequest(req_num, &found);
+ auto client = g_app_list.lookUpClient(trigger.appid);
+ auto pCurState = *this->layers.get_layout_state((int)client->surfaceID(trigger.role));
+ struct LayoutState &curState = *pCurState;
+ curState = state;
+ }
+
+ return WMError::SUCCESS;