add role to layer::to_json()
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>
Fri, 18 Aug 2017 13:44:19 +0000 (15:44 +0200)
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>
Mon, 4 Sep 2017 14:53:58 +0000 (16:53 +0200)
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
src/app.cpp
src/layers.cpp

index f3c9234..72e8c23 100644 (file)
@@ -393,11 +393,6 @@ result<int> App::request_surface(char const *drawing_name) {
    auto rname = this->id_alloc[drawing_name];
    if (!rname) {
       // name does not exist yet, allocate surface id...
-      // XXX: how to allocate surface IDs?
-      // * allocate by running a counter for each layer?
-      // * allocate IDs globally, i.e. do not have layers contain
-      //   ID ranges (only define the surfaces on the layer by
-      //   role?)
       auto id = int(this->id_alloc(drawing_name));
       this->layers.add_surface(id, lid.value());
 
index 7beb075..c814c22 100644 (file)
@@ -182,6 +182,7 @@ json layer::to_json() const {
       {"id_min", this->id_min},
       {"id_max", this->id_max},
       {"name", this->name},
+      {"role", this->role},
       {"layer_id", this->layer_id},
       {"area", r},
    };