summaryrefslogtreecommitdiff
path: root/openbox/geom.h
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-06-27 04:20:30 +0000
committerDana Jansens <danakj@orodu.net>2003-06-27 04:20:30 +0000
commit34e819738b344a992a1dbfd6cdd165e0c8ddb3a9 (patch)
tree479e77d920b6f595e92955dfcbb8fd0b63720ad1 /openbox/geom.h
parentd0abbec2e522119c0865f668b094c60a1712e24f (diff)
xinerama support
Diffstat (limited to 'openbox/geom.h')
-rw-r--r--openbox/geom.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/openbox/geom.h b/openbox/geom.h
index a4c1752a..5f2c030c 100644
--- a/openbox/geom.h
+++ b/openbox/geom.h
@@ -34,8 +34,14 @@ typedef struct Rect {
(r1).height == (r2).height)
#define RECT_CONTAINS(r, x, y) \
- (x >= (r).x && x < (r).x + (r).width && \
- y >= (r).y && y < (r).y + (r).height)
+ ((x) >= (r).x && (x) < (r).x + (r).width && \
+ (y) >= (r).y && (y) < (r).y + (r).height)
+#define RECT_CONTAINS_RECT(r, o) \
+ ((o).x >= (r).x && (o).x + (o).width <= (r).x + (r).width && \
+ (o).y >= (r).y && (o).y + (o).height <= (r).y + (r).height)
+#define RECT_INTERSECTS_RECT(r, o) \
+ ((o).x < (r).x + (r).width && (o).x + (o).width > (r).x && \
+ (o).y < (r).y + (r).height && (o).y + (o).height > (r).y)
typedef struct Strut {
int left;