Module: wine Branch: master Commit: ed06aa2f7efc045f6f9914c817c255085e9d1daf URL: https://source.winehq.org/git/wine.git/?a=commit;h=ed06aa2f7efc045f6f9914c81...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Thu Nov 11 15:03:51 2021 +0800
comctl32/button: Use correct state for default buttons.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/comctl32/button.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index b612273c0c1..93f6c21bab1 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -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;