From 51b2d3854db6bb754a349ba6982fb3645ed14dc8 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 9 Aug 2015 21:09:50 +0200
Subject: [PATCH 3/5] uxtheme: Correctly render buttons with GTK >= 3.14.0.

---
 dlls/uxtheme/gtk-button.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/dlls/uxtheme/gtk-button.c b/dlls/uxtheme/gtk-button.c
index b4b2d023..b8674480 100644
--- a/dlls/uxtheme/gtk-button.c
+++ b/dlls/uxtheme/gtk-button.c
@@ -29,6 +29,10 @@
 
 #include "wine/debug.h"
 
+#if !GTK_CHECK_VERSION(3, 14, 0)
+# define GTK_STATE_FLAG_CHECKED (1 << 11)
+#endif
+
 WINE_DEFAULT_DEBUG_CHANNEL(uxthemegtk);
 
 typedef struct _button_theme
@@ -219,16 +223,16 @@ static GtkStateFlags get_checkbox_state_flags(int state_id)
             return GTK_STATE_FLAG_INSENSITIVE;
 
         case CBS_CHECKEDNORMAL:
-            return GTK_STATE_FLAG_NORMAL | GTK_STATE_FLAG_ACTIVE;
+            return GTK_STATE_FLAG_NORMAL | GTK_STATE_FLAG_ACTIVE | GTK_STATE_FLAG_CHECKED;
 
         case CBS_CHECKEDHOT:
-            return GTK_STATE_FLAG_PRELIGHT | GTK_STATE_FLAG_ACTIVE;
+            return GTK_STATE_FLAG_PRELIGHT | GTK_STATE_FLAG_ACTIVE | GTK_STATE_FLAG_CHECKED;
 
         case CBS_CHECKEDPRESSED:
-            return GTK_STATE_FLAG_SELECTED | GTK_STATE_FLAG_ACTIVE;
+            return GTK_STATE_FLAG_SELECTED | GTK_STATE_FLAG_ACTIVE | GTK_STATE_FLAG_CHECKED;
 
         case CBS_CHECKEDDISABLED:
-            return GTK_STATE_FLAG_INSENSITIVE | GTK_STATE_FLAG_ACTIVE;
+            return GTK_STATE_FLAG_INSENSITIVE | GTK_STATE_FLAG_ACTIVE | GTK_STATE_FLAG_CHECKED;
 
         case CBS_MIXEDNORMAL:
             return GTK_STATE_FLAG_NORMAL | GTK_STATE_FLAG_INCONSISTENT;
@@ -237,7 +241,7 @@ static GtkStateFlags get_checkbox_state_flags(int state_id)
             return GTK_STATE_FLAG_PRELIGHT | GTK_STATE_FLAG_INCONSISTENT;
 
         case CBS_MIXEDPRESSED:
-            return GTK_STATE_FLAG_ACTIVE | GTK_STATE_FLAG_INCONSISTENT;
+            return GTK_STATE_FLAG_ACTIVE | GTK_STATE_FLAG_CHECKED | GTK_STATE_FLAG_INCONSISTENT;
 
         case CBS_MIXEDDISABLED:
             return GTK_STATE_FLAG_INSENSITIVE | GTK_STATE_FLAG_INCONSISTENT;
-- 
2.20.1

