Index: gtktreeview.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktreeview.c,v
retrieving revision 1.429.2.5
diff -p -u -u -p -U8 -r1.429.2.5 gtktreeview.c
--- gtktreeview.c	1 Feb 2005 18:52:09 -0000	1.429.2.5
+++ gtktreeview.c	14 Feb 2005 20:17:27 -0000
@@ -37,16 +37,17 @@
 #include "gtkvbox.h"
 #include "gtkarrow.h"
 #include "gtkintl.h"
 #include "gtkbindings.h"
 #include "gtkcontainer.h"
 #include "gtkentry.h"
 #include "gtkframe.h"
 #include "gtktreemodelsort.h"
+#include "gtkwindow.h"
 
 #define GTK_TREE_VIEW_PRIORITY_VALIDATE (GDK_PRIORITY_REDRAW + 5)
 #define GTK_TREE_VIEW_PRIORITY_SCROLL_SYNC (GTK_TREE_VIEW_PRIORITY_VALIDATE + 2)
 #define GTK_TREE_VIEW_NUM_ROWS_PER_IDLE 500
 #define SCROLL_EDGE_SIZE 15
 #define EXPANDER_EXTRA_PADDING 4
 #define GTK_TREE_VIEW_SEARCH_DIALOG_TIMEOUT 5000
 #define AUTO_EXPAND_TIMEOUT 500
@@ -8888,24 +8889,39 @@ send_focus_change (GtkWidget *widget,
 
   g_object_unref (widget);
   gdk_event_free (fevent);
 }
 
 static void
 gtk_tree_view_ensure_interactive_directory (GtkTreeView *tree_view)
 {
-  GtkWidget *frame, *vbox;
+  GtkWidget *frame, *vbox, *toplevel;
+
+  toplevel = gtk_widget_get_toplevel (GTK_WIDGET (tree_view));
 
   if (tree_view->priv->search_window != NULL)
-    return;
+    {
+      if (GTK_WINDOW (toplevel)->group)
+        gtk_window_group_add_window (GTK_WINDOW (toplevel)->group,
+    				     GTK_WINDOW (tree_view->priv->search_window));
+      else if (GTK_WINDOW (tree_view->priv->search_window)->group)
+        gtk_window_group_remove_window (GTK_WINDOW (tree_view->priv->search_window)->group,
+					GTK_WINDOW (tree_view->priv->search_window));
+      return;
+    }
 
   tree_view->priv->search_window = gtk_window_new (GTK_WINDOW_POPUP);
 
   gtk_window_set_modal (GTK_WINDOW (tree_view->priv->search_window), TRUE);
+
+  if (GTK_WINDOW (toplevel)->group)
+    gtk_window_group_add_window (GTK_WINDOW (toplevel)->group,
+    				 GTK_WINDOW (tree_view->priv->search_window));
+ 
   g_signal_connect (tree_view->priv->search_window, "delete_event",
 		    G_CALLBACK (gtk_tree_view_search_delete_event),
 		    tree_view);
   g_signal_connect (tree_view->priv->search_window, "key_press_event",
 		    G_CALLBACK (gtk_tree_view_search_key_press_event),
 		    tree_view);
   g_signal_connect (tree_view->priv->search_window, "button_press_event",
 		    G_CALLBACK (gtk_tree_view_search_button_press_event),
