winemac: Make cgrect_from_rect() preserve origin of empty rectangles.

This commit is contained in:
Ken Thomases 2013-08-20 17:00:27 -05:00 committed by Alexandre Julliard
parent 21e0f739be
commit 87dd13150a
1 changed files with 1 additions and 3 deletions

View File

@ -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)