[PATCH 1/2] gdi32/tests: Don't treat a return value of COMPLEXREGION from IntersectClipRect() as broken. (original) (raw)

Dmitry Timoshkov dmitry at baikal.ru
Mon Dec 30 20:12:30 CST 2019


Zebediah Figura <z.figura12 at gmail.com> wrote:

ret = IntersectClipRect(hdc, 0, 0, 50, 50); - if (ret == COMPLEXREGION) - { - /* XP returns COMPLEXREGION although dumpregion reports only 1 rect */ - trace("Windows BUG: IntersectClipRect returned %d instead of SIMPLEREGION\n", ret); - /* let's make sure that it's a simple region */ - ret = GetClipRgn(hdc, hrgn); - ok(ret == 1, "GetClipRgn returned %d instead of 1\n", ret); - dumpregion(hrgn); - } - else - ok(ret == SIMPLEREGION, "IntersectClipRect returned %d instead of SIMPLEREGION\n", ret); + todowine ok(ret == COMPLEXREGION, "wrong region type %d\n", ret); + ret = GetClipRgn(hdc, hrgn); + ok(ret == 1, "GetClipRgn returned %d instead of 1\n", ret); + ret = GetRegionData(hrgn, sizeof(buffer), rgndata); + ok(ret == sizeof(RGNDATAHEADER) + sizeof(RECT), "got %u\n", ret); + ok(rgndata->rdh.nCount == 1, "got %u rectangles\n", rgndata->rdh.nCount);

Even if every Windows version returns broken result doesn't make it legitimate to return COMPLEXREGION when the region contains only 1 rectangle. This is clearly broken.

-- Dmitry.



More information about the wine-devel mailing list