From 943dd68152d052188d7a5a0d33c8238f474eb462 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 5 Feb 2005 23:26:16 +0000 Subject: 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. --- openbox/geom.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'openbox/geom.h') 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), \ -- cgit v1.2.3