From b019c918ebcd986056963ce07549b28f45b1aef3 Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Sun, 26 Nov 2017 17:48:55 -0600 Subject: [PATCH] winemac: Fix test for simple non-restrictive window region optimization. Signed-off-by: Ken Thomases Signed-off-by: Alexandre Julliard --- dlls/winemac.drv/window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 2e244050625..e49a445f1a7 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -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;