Displaying 1 result from an estimated 1 matches for "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
...n (right - left) * (bottom - top);
+}
+
int
outputDeviceForGeometry (CompScreen *s,
int x,
@@ -3961,26 +3983,64 @@ outputDeviceForGeometry (CompScreen *s,
int height,
int borderWidth)
{
- int output = s->currentOutputDev;
- int x1, y1, x2, y2;
+ int *overlapAreas;
+ int i, highest, seen, highestScore;
+ BOX geomRect;
+
+ if (s->nOutputDev == 1)
+ return 0;
- width += borderWidth * 2;
- height += borderWidth * 2;
+ overlapAreas = malloc (s->nOutputDev * sizeof (int));
+ if (!overlapAreas)
+ return 0;
- x1 = s...