aboutsummaryrefslogtreecommitdiffstats
path: root/src/wm_layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wm_layer.cpp')
-rw-r--r--src/wm_layer.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/wm_layer.cpp b/src/wm_layer.cpp
index 1948b61..01e8950 100644
--- a/src/wm_layer.cpp
+++ b/src/wm_layer.cpp
@@ -82,7 +82,7 @@ void LayerState::setArea(const string& app, const string& area)
this->area2appid[area] = app;
}
-WMLayer::WMLayer(json_object* j) : tmp_state(), state()
+WMLayer::WMLayer(json_object* j, unsigned uuid) : tmp_state(), state(), uuid(uuid)
{
this->name = jh::getStringFromJson(j, "name");
this->role_list = jh::getStringFromJson(j, "role");
@@ -166,6 +166,11 @@ WMError WMLayer::setLayerState(const LayerState& l)
return WMError::SUCCESS;
}
+void WMLayer::addLayer(unsigned layer)
+{
+ this->tmp_state.addLayer(layer);
+}
+
void WMLayer::appendArea(const string& area)
{
this->area_list.push_back(area);
@@ -203,12 +208,13 @@ bool WMLayer::hasRole(const string& role)
return false;
}
-/* WMError WMLayer::commitChange()
+WMError WMLayer::commitChange()
{
this->state = this->tmp_state;
+ return WMError::SUCCESS;
}
-void WMLayer::undo()
+/* void WMLayer::undo()
{
this->tmp_state = this->state;
}