winemac: Fix test for simple non-restrictive window region optimization.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Ken Thomases 2017-11-26 17:48:55 -06:00 committed by Alexandre Julliard
parent a004e31ff0
commit b019c918eb
1 changed files with 2 additions and 1 deletions

View File

@ -402,7 +402,8 @@ static void sync_window_region(struct macdrv_win_data *data, HRGN win_region)
window, it's the same as there being no region. It's potentially
hard/slow to test this for arbitrary regions, so we just check for
very simple regions. */
if (count == 1 && CGRectContainsRect(rects[0], cgrect_from_rect(data->whole_rect)))
if (count == 1 && CGRectContainsRect(rects[0],
CGRectOffset(cgrect_from_rect(data->whole_rect), -data->whole_rect.left, -data->whole_rect.top)))
{
TRACE("optimizing for simple region that contains Cocoa content rect\n");
rects = NULL;