summaryrefslogtreecommitdiffstats
path: root/src/layout.hpp
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-12 11:29:29 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-12 11:29:29 +0200
commit2c9977101d257edd62b2fb2fa7fabb541efc6698 (patch)
tree8571ccccfdda89829247894f03d51c61eeda8caa /src/layout.hpp
parent1b4362e9a8ece16e37fc6327ad175475a56a6fe5 (diff)
app/layout: fix split layout from and to transitions
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src/layout.hpp')
-rw-r--r--src/layout.hpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/layout.hpp b/src/layout.hpp
index 33a503d..85ac30e 100644
--- a/src/layout.hpp
+++ b/src/layout.hpp
@@ -25,24 +25,25 @@
namespace wm {
-// Areas and layouts are defined to have a name, let's just keep it this way,
-// we will not copy them around anyway.
-struct area {
- std::string name;
- genivi::rect rect;
- uint32_t layer; // i.e. zorder?
+struct LayoutState {
+ enum States {
+ Single,
+ Split,
+ };
+
+ enum States s{Single};
+ int main{-1};
+ int sub{-1};
+
+ bool operator==(const LayoutState &b) const {
+ return s == b.s && main == b.main && sub == b.sub;
+ }
+
+ bool operator!=(const LayoutState &b) const {
+ return !(*this == b);
+ }
};
-struct layout {
- static constexpr unsigned MAX_N_AREAS = 2;
-
- std::string name;
- uint32_t n_areas;
- struct area areas[MAX_N_AREAS];
-};
-
-typedef std::vector<struct layout> layouts_type;
-
} // namespace wm
#endif // TMCAGLWM_LAYOUT_HPP