From 3651880f20c67b92c384f805191b1b5e3a3a8631 Mon Sep 17 00:00:00 2001
From: Samuel Kim <ubuntor2000@gmail.com>
Date: Sat, 5 Sep 2015 21:40:00 -0400
Subject: comctl32: fix buttons becoming unthemed when pressed/released

Fixes 37584.

---
 dlls/comctl32/theme_button.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dlls/comctl32/theme_button.c b/dlls/comctl32/theme_button.c
index 327c76b..cffa092 100644
--- a/dlls/comctl32/theme_button.c
+++ b/dlls/comctl32/theme_button.c
@@ -419,6 +419,14 @@ LRESULT CALLBACK THEMING_ButtonSubclassProc(HWND hwnd, UINT msg,
         break;
     }
 
+    case BM_SETCHECK:
+    case BM_SETSTATE:
+        theme = GetWindowTheme(hwnd);
+        if (theme) {
+            InvalidateRect(hwnd, NULL, FALSE);
+        }
+        return THEMING_CallOriginalClass(hwnd, msg, wParam, lParam);
+
     default:
 	/* Call old proc */
 	return THEMING_CallOriginalClass(hwnd, msg, wParam, lParam);
-- 
2.5.1

