Zhiyi Zhang : comctl32/button: Use correct state for default buttons.
Alexandre Julliard
julliard at winehq.org
Thu Nov 11 16:01:28 CST 2021
Module: wine
Branch: master
Commit: ed06aa2f7efc045f6f9914c817c255085e9d1daf
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ed06aa2f7efc045f6f9914c817c255085e9d1daf
Author: Zhiyi Zhang <zzhang at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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;
More information about the wine-cvs
mailing list