Index: gal-combo-box.c
===================================================================
RCS file: /cvs/gnome/gal/gal/widgets/gal-combo-box.c,v
retrieving revision 1.1
diff -u -r1.1 gal-combo-box.c
--- gal-combo-box.c	17 Nov 2003 21:05:15 -0000	1.1
+++ gal-combo-box.c	12 Feb 2004 08:39:40 -0000
@@ -330,6 +330,7 @@
 			  GDK_BUTTON_RELEASE_MASK |
 			  GDK_POINTER_MOTION_MASK,
 			  NULL, NULL, GDK_CURRENT_TIME);
+	gdk_keyboard_grab (combo_box->priv->toplevel->window, TRUE, GDK_CURRENT_TIME);
 }
 
 static int
@@ -401,7 +402,7 @@
 	 */
 	combo_box->priv->arrow_button = gtk_toggle_button_new ();
 	gtk_button_set_relief (GTK_BUTTON (combo_box->priv->arrow_button), GTK_RELIEF_NONE);
-	GTK_WIDGET_UNSET_FLAGS (combo_box->priv->arrow_button, GTK_CAN_FOCUS);
+	/*GTK_WIDGET_UNSET_FLAGS (combo_box->priv->arrow_button, GTK_CAN_FOCUS); */
 
 	arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_IN);
 	gtk_container_add (GTK_CONTAINER (combo_box->priv->arrow_button), arrow);
Index: color-palette.c
===================================================================
RCS file: /cvs/gnome/gal/gal/widgets/color-palette.c,v
retrieving revision 1.21
diff -u -r1.21 color-palette.c
--- color-palette.c	16 Nov 2002 23:42:17 -0000	1.21
+++ color-palette.c	12 Feb 2004 09:03:19 -0000
@@ -281,6 +281,35 @@
 }
 
 /*
+ * Repaint the canvas to erase the focus area when the button 
+ * lost focus.
+ */
+static gboolean
+on_color_palette_button_focus_out (GtkWidget	*button,
+				GdkEventFocus	*event,
+				GtkWidget	*canvas)
+{
+	gtk_widget_queue_draw (canvas);
+	return FALSE;
+}
+
+/*
+ * Paint the focus area on the top canvas when the button is focused.
+ */
+static gboolean
+on_color_palette_button_focus_in (GtkWidget	*button,
+				GdkEventFocus	*event,
+				GtkWidget	*canvas)
+{
+	gtk_paint_focus (canvas->style, ((GtkLayout *)canvas)->bin_window, 
+			GTK_WIDGET_STATE (canvas),
+			NULL, canvas, "button",
+			0, 0, canvas->allocation.width, 
+			canvas->allocation.height);
+	return FALSE;
+}
+
+/*
  * Create the individual color buttons
  *
  * Utility function
@@ -305,10 +334,10 @@
 	item  = gnome_canvas_item_new (GNOME_CANVAS_GROUP (gnome_canvas_root
 							   (GNOME_CANVAS (canvas))),
 				       gnome_canvas_rect_get_type (),
-				       "x1", 0.0,
-				       "y1", 0.0,
-				       "x2", (double) COLOR_PREVIEW_WIDTH,
-				       "y2", (double) COLOR_PREVIEW_HEIGHT,
+				       "x1", 2.0,
+				       "y1", 2.0,
+				       "x2", 2.0+(double) COLOR_PREVIEW_WIDTH,
+				       "y2", 2.0+(double) COLOR_PREVIEW_HEIGHT,
 				       "fill_color", color_name->color,
 				       NULL);
 
@@ -320,6 +349,12 @@
 
 	g_signal_connect (button, "clicked",
 			  G_CALLBACK (color_clicked), P);
+	g_signal_connect (button, "focus_in_event",
+			  G_CALLBACK (on_color_palette_button_focus_in), 
+			  canvas);
+	g_signal_connect (button, "focus_out_event",
+			  G_CALLBACK (on_color_palette_button_focus_out), 
+			  canvas);
 	gtk_object_set_user_data (GTK_OBJECT (button),
 				  GINT_TO_POINTER (data));
 	return item;
Index: widget-color-combo.c
===================================================================
RCS file: /cvs/gnome/gal/gal/widgets/widget-color-combo.c,v
retrieving revision 1.46
diff -u -r1.46 widget-color-combo.c
--- widget-color-combo.c	17 Nov 2003 21:05:15 -0000	1.46
+++ widget-color-combo.c	12 Feb 2004 09:11:28 -0000
@@ -123,6 +123,40 @@
 		gdk_color_free (color);
 }
 
+/*
+ * Repaint the canvas to erase the focus area when the button 
+ * lost focus.
+ */
+static gboolean
+on_preview_button_focus_out (GtkWidget *button, GdkEventFocus *event,
+		GtkWidget *canvas)
+{
+	gtk_widget_queue_draw (canvas);
+	return FALSE;
+}
+
+/*
+ * Paint the focus area on the top canvas when the button is focused.
+ */
+static gboolean
+on_preview_button_focus_in (GtkWidget *button, GdkEventFocus *event,
+		GtkWidget *canvas)
+{
+	gint focus_width, focus_pad, focus_tune;
+	gtk_widget_style_get (GTK_WIDGET (canvas),
+				"focus-line-width", &focus_width,
+				"focus-padding", &focus_pad,
+				NULL);
+	focus_tune = focus_width + focus_pad;
+	gtk_paint_focus (canvas->style, ((GtkLayout *)canvas)->bin_window,
+		GTK_WIDGET_STATE (canvas),
+		NULL, canvas, "preview-button",
+		focus_tune, focus_tune, 
+		canvas->allocation.width - 2*focus_tune, 
+		canvas->allocation.height - 2*focus_tune);
+	return FALSE;
+}
+
 static void
 cb_cust_color_clicked (GtkWidget *widget, ColorCombo *cc)
 {
@@ -225,6 +259,10 @@
 	gtk_widget_set_usize (GTK_WIDGET (cc->preview_canvas), 24, 22);
 	g_signal_connect (cc->preview_button, "clicked",
 			  G_CALLBACK (preview_clicked), cc);
+	g_signal_connect (cc->preview_button, "focus_in_event",
+			  G_CALLBACK (on_preview_button_focus_in), cc->preview_canvas);
+	g_signal_connect (cc->preview_button, "focus_out_event",
+			  G_CALLBACK (on_preview_button_focus_out), cc->preview_canvas);
 
 	color_table_setup (cc, no_color_label, color_group);
 
