Index: gtkcheckbutton.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkcheckbutton.c,v
retrieving revision 1.49.2.1
diff -u -r1.49.2.1 gtkcheckbutton.c
--- gtkcheckbutton.c	20 Mar 2005 06:25:27 -0000	1.49.2.1
+++ gtkcheckbutton.c	5 Jun 2005 17:48:53 -0000
@@ -49,6 +49,7 @@
 						  GdkRectangle        *area);
 static void gtk_real_check_button_draw_indicator (GtkCheckButton      *check_button,
 						  GdkRectangle        *area);
+static void gtk_check_button_update_state  	  (GtkButton          *button);
 
 static GtkToggleButtonClass *parent_class = NULL;
 
@@ -85,14 +86,20 @@
 gtk_check_button_class_init (GtkCheckButtonClass *class)
 {
   GtkWidgetClass *widget_class;
+  GtkButtonClass *button_class;
   
   widget_class = (GtkWidgetClass*) class;
+  button_class = (GtkButtonClass*) class;
+
   parent_class = g_type_class_peek_parent (class);
   
   widget_class->size_request = gtk_check_button_size_request;
   widget_class->size_allocate = gtk_check_button_size_allocate;
   widget_class->expose_event = gtk_check_button_expose;
 
+  button_class->enter = gtk_check_button_update_state;
+  button_class->leave = gtk_check_button_update_state;
+
   class->draw_indicator = gtk_real_check_button_draw_indicator;
 
   gtk_widget_class_install_style_property (widget_class,
@@ -452,5 +459,29 @@
     }
 }
 
+static void
+gtk_check_button_update_state (GtkButton *button)
+{
+  GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (button);
+  gboolean depressed;
+  GtkStateType new_state;
+
+  if (toggle_button->inconsistent)
+    depressed = FALSE;
+  else if (button->in_button && button->button_down)
+    depressed = TRUE;
+  else
+    depressed = toggle_button->active;
+      
+  if (button->in_button && (!button->button_down || toggle_button->draw_indicator))
+    new_state = GTK_STATE_PRELIGHT;
+  else
+    new_state = depressed ? GTK_STATE_ACTIVE : GTK_STATE_NORMAL;
+
+  _gtk_button_set_depressed (button, depressed); 
+  gtk_widget_set_state (GTK_WIDGET (toggle_button), new_state);
+}
+
+
 #define __GTK_CHECK_BUTTON_C__
 #include "gtkaliasdef.c"
Index: gtktogglebutton.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktogglebutton.c,v
retrieving revision 1.54.2.4
diff -u -r1.54.2.4 gtktogglebutton.c
--- gtktogglebutton.c	7 Apr 2005 05:09:32 -0000	1.54.2.4
+++ gtktogglebutton.c	5 Jun 2005 17:48:53 -0000
@@ -489,7 +489,7 @@
   else
     depressed = toggle_button->active;
       
-  if (button->in_button && (!button->button_down || toggle_button->draw_indicator))
+  if (button->in_button && (!button->button_down || toggle_button->draw_indicator) && !toggle_button->active)
     new_state = GTK_STATE_PRELIGHT;
   else
     new_state = depressed ? GTK_STATE_ACTIVE : GTK_STATE_NORMAL;
