summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-01 17:48:07 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-08 17:24:00 +0200
commit852cc727023d68ea0a439b68a18b144ce62c8fbe (patch)
tree9da42af7bf7e29eb498f6ce3fc30cb457013a169
parentda534c85f4dd4bb83a7f364a3b93a2ba156c7bcb (diff)
wayland: add genivi::full_rect and operator== for genivi::rect
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
-rw-r--r--src/wayland.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wayland.hpp b/src/wayland.hpp
index b5e2d51..3560e2c 100644
--- a/src/wayland.hpp
+++ b/src/wayland.hpp
@@ -129,6 +129,12 @@ struct rect {
int32_t x, y;
};
+static const constexpr rect full_rect = rect{-1, -1, 0, 0};
+
+inline bool operator == (struct rect a, struct rect b) {
+ return a.w == b.w && a.h == b.h && a.x == b.x && a.y == b.y;
+}
+
struct controller;
struct controller_child {