IsRectEmpty also returns true for negative width/heights (verified against Windows), found by Brad Oliver <bradman@pobox.com>.
diff --git a/windows/rect.c b/windows/rect.c index 02ab99c..1717cf8 100644 --- a/windows/rect.c +++ b/windows/rect.c
@@ -80,19 +80,23 @@ /*********************************************************************** * IsRectEmpty16 (USER.75) + * + * Bug compat: Windows checks for 0 or negative width/height. */ BOOL16 WINAPI IsRectEmpty16( const RECT16 *rect ) { - return ((rect->left == rect->right) || (rect->top == rect->bottom)); + return ((rect->left >= rect->right) || (rect->top >= rect->bottom)); } /*********************************************************************** * IsRectEmpty32 (USER32.347) + * + * Bug compat: Windows checks for 0 or negative width/height. */ BOOL WINAPI IsRectEmpty( const RECT *rect ) { - return ((rect->left == rect->right) || (rect->top == rect->bottom)); + return ((rect->left >= rect->right) || (rect->top >= rect->bottom)); }