summaryrefslogtreecommitdiff
path: root/openbox/geom.h
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@comhem.se>2005-02-05 23:26:16 +0000
committerMikael Magnusson <mikachu@comhem.se>2005-02-05 23:26:16 +0000
commit943dd68152d052188d7a5a0d33c8238f474eb462 (patch)
tree21b08383612cab20ced0379bbac40c15e642d4e3 /openbox/geom.h
parent05863a61b89c41f2633651a156c5e918207e29b3 (diff)
the xinerama patch from john russell, modified a bit and merged the move_onmonitor with the already existing move_onscreen stuff, not sure if it actually works on xinerama since i dont have it.
Diffstat (limited to 'openbox/geom.h')
-rw-r--r--openbox/geom.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/openbox/geom.h b/openbox/geom.h
index 91dd48eb..d55bc081 100644
--- a/openbox/geom.h
+++ b/openbox/geom.h
@@ -62,10 +62,13 @@ typedef struct _Rect {
#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)
+
+/* Returns true if Rect r and o intersect */
#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)
+/* Sets Rect r to be the intersection of Rect a and b. */
#define RECT_SET_INTERSECTION(r, a, b) \
((r).x = MAX((a).x, (b).x), \
(r).y = MAX((a).y, (b).y), \