Michael Stefaniuc : user32: Use InflateRect() instead of open coding it.
Module: wine Branch: master Commit: 9ed915083f2749a47a70c7c6cfe48d9955d317fa URL: http://source.winehq.org/git/wine.git/?a=commit;h=9ed915083f2749a47a70c7c6cf... Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Mon Jun 6 11:16:11 2016 +0200 user32: Use InflateRect() instead of open coding it. Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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 ); }
participants (1)
-
Alexandre Julliard