winemac: Make cgrect_from_rect() preserve origin of empty rectangles.
This commit is contained in:
parent
21e0f739be
commit
87dd13150a
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue