Zhiyi Zhang : comctl32/button: Do not restore groupbox font after themed painting.
Alexandre Julliard
julliard at winehq.org
Fri Oct 1 18:02:22 CDT 2021
Module: wine
Branch: master
Commit: 1e7e31cab9fd6fd5aea1d580fa3433e4eb662d5f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=1e7e31cab9fd6fd5aea1d580fa3433e4eb662d5f
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Fri Oct 1 11:29:30 2021 +0800
comctl32/button: Do not restore groupbox font after themed painting.
Fix button tests failures when theming is on.
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/button.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c
index 894cc6a3df9..f0b2c56b5fe 100644
--- a/dlls/comctl32/button.c
+++ b/dlls/comctl32/button.c
@@ -2835,8 +2835,8 @@ static void GB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
created_font = TRUE;
}
} else {
- font = (HFONT)SendMessageW(infoPtr->hwnd, WM_GETFONT, 0, 0);
- hPrevFont = SelectObject(hDC, font);
+ if (infoPtr->font)
+ SelectObject(hDC, infoPtr->font);
}
GetClientRect(infoPtr->hwnd, &bgRect);
More information about the wine-cvs
mailing list