Nikolay Sivov : comctl32/combo: Remove unnecessary argument from button painting helper.
Module: wine Branch: master Commit: d0f9e5e81603ef4b9732dd0b8565197e96b90140 URL: https://source.winehq.org/git/wine.git/?a=commit;h=d0f9e5e81603ef4b9732dd0b8... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Nov 28 09:06:34 2019 +0300 comctl32/combo: Remove unnecessary argument from button painting helper. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/combo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/combo.c b/dlls/comctl32/combo.c index 1fa5f5ef21..827da37c0c 100644 --- a/dlls/comctl32/combo.c +++ b/dlls/comctl32/combo.c @@ -545,10 +545,13 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG * * Paint combo button (normal, pressed, and disabled states). */ -static void CBPaintButton( LPHEADCOMBO lphc, HDC hdc, RECT rectButton) +static void CBPaintButton(HEADCOMBO *lphc, HDC hdc) { UINT buttonState = DFCS_SCROLLCOMBOBOX; + if (IsRectEmpty(&lphc->buttonRect)) + return; + if( lphc->wState & CBF_NOREDRAW ) return; @@ -559,7 +562,7 @@ static void CBPaintButton( LPHEADCOMBO lphc, HDC hdc, RECT rectButton) if (CB_DISABLED(lphc)) buttonState |= DFCS_INACTIVE; - DrawFrameControl(hdc, &rectButton, DFC_SCROLL, buttonState); + DrawFrameControl(hdc, &lphc->buttonRect, DFC_SCROLL, buttonState); } /*********************************************************************** @@ -815,8 +818,7 @@ static LRESULT COMBO_Paint(HEADCOMBO *lphc, HDC hdc) */ CBPaintBorder(lphc->self, lphc, hdc); - if (!IsRectEmpty(&lphc->buttonRect)) - CBPaintButton(lphc, hdc, lphc->buttonRect); + CBPaintButton(lphc, hdc); /* paint the edit control padding area */ if (CB_GETTYPE(lphc) != CBS_DROPDOWNLIST)
participants (1)
-
Alexandre Julliard