wayland: add genivi::full_rect and operator== for genivi::rect
[staging/windowmanager.git] / src / wayland.hpp
index 4ab4709..3560e2c 100644 (file)
@@ -125,10 +125,16 @@ struct size {
 };
 
 struct rect {
-   uint32_t w, h;
+   int32_t w, h;
    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 {