Displaying 1 result from an estimated 1 matches for "currentsize".
Did you mean:
current_size
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
...highestScore)
+ seen++;
+
+ if (seen > 1)
{
- output = outputDeviceForPoint (s, x + width / 2, y + height / 2);
+ /* it's not unique, so find the head which is more overlapped by
+ the window, which in turns means finding the smallest of the
+ given heads */
+ unsigned int currentSize, smallestHead = UINT_MAX;
+
+ for (i = 0, highest = 0; i < s->nOutputDev; i++)
+ if (overlapAreas[i] == highestScore)
+ {
+ BOX *box = &s->outputDev[i].region.extents;
+
+ currentSize = (box->x2 - box->x1) * (box->y2 - box->y1);
+ if (currentSize < smallestHea...