void LayerState::dump()
{
- std::string str;
+ std::string ids, apps;
for(const auto& ro : this->render_order)
{
- str += std::to_string(ro);
- str += ",";
+ ids += std::to_string(ro);
+ ids += ",";
}
- DUMP(" render order : %s", str.c_str());
+ for(const auto& area : this->area2appid)
+ {
+ apps += area.first;
+ apps += ":";
+ apps += area.second;
+ apps += ",";
+ }
+ DUMP(" render order : %s", ids.c_str());
+ DUMP(" area, app : %s", apps.c_str());
}
WMLayer::WMLayer(json_object* j, unsigned uuid) : tmp_state(), state(), uuid(uuid)
this->tmp_state.removeLayer(layer);
}
+void WMLayer::setAreaToState(const string& app, const string& area)
+{
+ this->tmp_state.setArea(app, area);
+}
+
void WMLayer::appendArea(const string& area)
{
this->area_list.push_back(area);
// Manipulation
void addLayerToState(unsigned layer);
void removeLayerFromState(unsigned layer);
+ void setAreaToState(const std::string& app, const std::string& area);
void terminateApp(unsigned layer);
WMError commitChange();
{
if(wm_layer->hasLayerID(layer))
{
+ wm_layer->setAreaToState(action.client->appID(), action.area);
+ /* TODO: manipulate state directly
LayerState ls = wm_layer->getLayerState();
ls.setArea(action.client->appID(), action.area);
+ wm_layer->dump(); */
}
}