Index: gtkbutton.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkbutton.c,v
retrieving revision 1.88
diff -u -p -u -r1.88 gtkbutton.c
--- gtkbutton.c	10 Dec 2002 21:39:53 -0000	1.88
+++ gtkbutton.c	2 Apr 2003 19:25:34 -0000
@@ -313,6 +313,7 @@ gtk_button_init (GtkButton *button)
   button->use_underline = FALSE;
   button->depressed = FALSE;
   button->depress_on_activate = TRUE;
+  button->focus_with_mouse = TRUE;
 }
 
 static void
@@ -938,7 +939,7 @@ gtk_button_button_press (GtkWidget      
     {
       button = GTK_BUTTON (widget);
 
-      if (!GTK_WIDGET_HAS_FOCUS (widget))
+      if (!GTK_WIDGET_HAS_FOCUS (widget) && button->focus_with_mouse)
 	gtk_widget_grab_focus (widget);
 
       if (event->button == 1)
@@ -1279,4 +1280,11 @@ gtk_button_update_state (GtkButton *butt
 
   _gtk_button_set_depressed (button, depressed); 
   gtk_widget_set_state (GTK_WIDGET (button), new_state);
+}
+
+void
+_gtk_button_set_take_focus_with_mouse (GtkButton     *button,
+				       gboolean       focus_with_mouse)
+{
+  button->focus_with_mouse = focus_with_mouse? TRUE : FALSE;
 }
Index: gtkbutton.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkbutton.h,v
retrieving revision 1.25
diff -u -p -u -r1.25 gtkbutton.h
--- gtkbutton.h	11 Oct 2002 22:57:11 -0000	1.25
+++ gtkbutton.h	2 Apr 2003 19:25:34 -0000
@@ -66,6 +66,7 @@ struct _GtkButton
   guint use_stock : 1;
   guint depressed : 1;
   guint depress_on_activate : 1;
+  guint focus_with_mouse : 1;
 };
 
 struct _GtkButtonClass
@@ -111,14 +112,16 @@ void                  gtk_button_set_use
 						    gboolean     use_stock);
 gboolean              gtk_button_get_use_stock     (GtkButton   *button);
 
-void _gtk_button_set_depressed (GtkButton    *button,
-				gboolean      depressed);
-void _gtk_button_paint         (GtkButton    *button,
-				GdkRectangle *area,
-				GtkStateType  state_type,
-				GtkShadowType shadow_type,
-				const gchar  *main_detail,
-				const gchar  *default_detail);
+void _gtk_button_set_depressed             (GtkButton     *button,
+					    gboolean       depressed);
+void _gtk_button_paint                     (GtkButton     *button,
+					    GdkRectangle  *area,
+					    GtkStateType   state_type,
+					    GtkShadowType  shadow_type,
+					    const gchar   *main_detail,
+					    const gchar   *default_detail);
+void _gtk_button_set_take_focus_with_mouse (GtkButton     *button,
+					    gboolean       focus_with_mouse);
 
 #ifdef __cplusplus
 }
