From 87dd13150a69a57ad524daed72d5405064db39fa Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Tue, 20 Aug 2013 17:00:27 -0500 Subject: [PATCH] winemac: Make cgrect_from_rect() preserve origin of empty rectangles. --- dlls/winemac.drv/macdrv.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index 4c74ddc8531..9bf1b7a18df 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -44,9 +44,7 @@ static inline CGRect cgrect_from_rect(RECT rect) { - if (rect.left >= rect.right || rect.top >= rect.bottom) - return CGRectNull; - return CGRectMake(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top); + return CGRectMake(rect.left, rect.top, max(0, rect.right - rect.left), max(0, rect.bottom - rect.top)); } static inline RECT rect_from_cgrect(CGRect cgrect)