]> git.sur5r.net Git - i3/i3/blobdiff - src/util.c
implement 'move' command in the new parser
[i3/i3] / src / util.c
index cf8f8df69bda9aaf244cf1f70955903492e6b0ba..c8f4ee389492962b8817b8be39737dcbed20362a 100644 (file)
@@ -31,6 +31,13 @@ int max(int a, int b) {
         return (a > b ? a : b);
 }
 
+bool rect_contains(Rect rect, uint32_t x, uint32_t y) {
+        return (x >= rect.x &&
+                x <= (rect.x + rect.width) &&
+                y >= rect.y &&
+                y <= (rect.y + rect.height));
+}
+
 /*
  * Updates *destination with new_value and returns true if it was changed or false
  * if it was the same