search for: overlaparea

Displaying 1 result from an estimated 1 matches for "overlaparea".

Did you mean: overlapareas
2008 Feb 08
0
[PATCH] Make outputDeviceForGeometry behave smarter when dealing with overlapping outputs. Currently, the current output is returned if some part of the rectangle is on it; otherwise the output device the rectangle center is on is returned. This works
...+ b/src/screen.c @@ -36,6 +36,7 @@ #include <sys/types.h> #include <unistd.h> #include <assert.h> +#include <limits.h> #include <X11/Xlib.h> #include <X11/Xatom.h> @@ -3953,6 +3954,27 @@ viewportForGeometry (CompScreen *s, } } +static int +rectangleOverlapArea (BOX *rect1, + BOX *rect2) +{ + int left, right, top, bottom; + + /* extents of overlapping rectangle */ + left = MAX (rect1->x1, rect2->x1); + right = MIN (rect1->x2, rect2->x2); + top = MAX (rect1->y1, rect2->y1); + bottom = MIN (rect1->y2, rect2->...