user32: Use InflateRect() instead of open coding it.

Michael Stefaniuc mstefani at redhat.de
Mon Jun 6 04:16:11 CDT 2016


Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
---
For Dmitry


 dlls/user32/scroll.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c
index a210962..4b572e5 100644
--- a/dlls/user32/scroll.c
+++ b/dlls/user32/scroll.c
@@ -360,18 +360,12 @@ static BOOL SCROLL_PtInRectEx( LPRECT lpRect, POINT pt, BOOL vertical )
     if (vertical)
     {
         scrollbarWidth = lpRect->right - lpRect->left;
-        rect.left -= scrollbarWidth*8;
-        rect.right += scrollbarWidth*8;
-        rect.top -= scrollbarWidth*2;
-        rect.bottom += scrollbarWidth*2;
+        InflateRect(&rect, scrollbarWidth * 8, scrollbarWidth * 2);
     }
     else
     {
         scrollbarWidth = lpRect->bottom - lpRect->top;
-        rect.left -= scrollbarWidth*2;
-        rect.right += scrollbarWidth*2;
-        rect.top -= scrollbarWidth*8;
-        rect.bottom += scrollbarWidth*8;
+        InflateRect(&rect, scrollbarWidth * 2, scrollbarWidth * 8);
     }
     return PtInRect( &rect, pt );
 }
-- 
2.4.11



More information about the wine-patches mailing list