Commit 87dd1315 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

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

parent 21e0f739
......@@ -44,9 +44,7 @@ extern const char* debugstr_cf(CFTypeRef t) DECLSPEC_HIDDEN;
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment