Clean: Remove split_layout structure 23/16923/1
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>
Thu, 4 Oct 2018 01:39:37 +0000 (10:39 +0900)
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>
Thu, 4 Oct 2018 01:39:37 +0000 (10:39 +0900)
split_layout is not used anymore.

Change-Id: Iff24ebb4e827aee28394deb3aa55c96692cd0cc6
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
src/layers.cpp
src/layers.hpp

index bbe7c09..b7a0fa2 100644 (file)
@@ -31,35 +31,7 @@ layer::layer(nlohmann::json const &j)
     this->name = j["name"];
     this->layer_id = j["layer_id"];
 
-    // Init flag of normal layout only
-    this->is_normal_layout_only = true;
-
-    auto split_layouts = j.find("split_layouts");
-    if (split_layouts != j.end())
-    {
-
-        // Clear flag of normal layout only
-        this->is_normal_layout_only = false;
-
-        auto &sls = j["split_layouts"];
-        // this->layouts.reserve(sls.size());
-        std::transform(std::cbegin(sls), std::cend(sls),
-                       std::back_inserter(this->layouts), [this](json const &sl) {
-                           struct split_layout l
-                           {
-                               sl["name"], sl["main_match"], sl["sub_match"]
-                           };
-                           HMI_DEBUG("wm",
-                                     "layer %d add split_layout \"%s\" (main: \"%s\") (sub: "
-                                     "\"%s\")",
-                                     this->layer_id,
-                                     l.name.c_str(), l.main_match.c_str(),
-                                     l.sub_match.c_str());
-                           return l;
-                       });
-    }
-    HMI_DEBUG("wm", "layer_id:%d is_normal_layout_only:%d\n",
-              this->layer_id, this->is_normal_layout_only);
+    HMI_DEBUG("wm", "layer_id:%d name:%s", this->layer_id, this->name.c_str());
 }
 
 struct result<struct layer_map> to_layer_map(nlohmann::json const &j)
index f52886e..3a16985 100644 (file)
 namespace wm
 {
 
-struct split_layout
-{
-    std::string name;
-    std::string main_match;
-    std::string sub_match;
-};
-
 struct layer
 {
     using json = nlohmann::json;
@@ -43,23 +36,14 @@ struct layer
     // The actual layer ID
     int layer_id = -1;
     // The rectangular region surfaces are allowed to draw on
-    // this layer, note however, width and hieght of the rect
-    // can be negative, in which case they specify that
-    // the actual value is computed using MAX + 1 - w
-    // That is; allow us to specify dimensions dependent on
-    // e.g. screen dimension, w/o knowing the actual screen size.
+    // this layer.
     compositor::rect rect;
     // Specify a role prefix for surfaces that should be
     // put on this layer.
     std::string role;
-    // TODO: perhaps a zorder is needed here?
-    std::vector<struct split_layout> layouts;
 
     mutable struct LayoutState state;
 
-    // Flag of normal layout only
-    bool is_normal_layout_only;
-
     explicit layer(nlohmann::json const &j);
 
     json to_json() const;