comctl32/button: Use correct state for default buttons.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2021-11-11 15:03:51 +08:00 committed by Alexandre Julliard
parent a7f6d78406
commit ed06aa2f7e
1 changed files with 2 additions and 1 deletions

View File

@ -410,7 +410,8 @@ static int get_draw_state(const BUTTON_INFO *infoPtr)
state = STATE_PRESSED;
else if (infoPtr->state & BST_HOT)
state = STATE_HOT;
else if (infoPtr->state & BST_FOCUS)
else if (infoPtr->state & BST_FOCUS || type == BS_DEFPUSHBUTTON || type == BS_DEFSPLITBUTTON
|| (type == BS_DEFCOMMANDLINK && !(style & BS_PUSHLIKE)))
state = STATE_DEFAULTED;
else
state = STATE_NORMAL;