]> spindle.queued.net Git - midori/commitdiff
Focus the web view after cancelling an inline find
authorChristian Dywan <christian@twotoasts.de>
Sun, 22 Feb 2009 01:47:30 +0000 (02:47 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sun, 22 Feb 2009 01:47:30 +0000 (02:47 +0100)
midori/midori-browser.c

index c866ce69f275b30543c9f3974563127f67751e68..ce4410e59e14421cdadf59e53f54ea8dc40b6d42 100644 (file)
@@ -1587,6 +1587,9 @@ midori_browser_find_key_press_event_cb (GtkWidget*     toolbar,
         midori_view_unmark_text_matches (MIDORI_VIEW (view));
         gtk_widget_hide (toolbar);
         browser->find_typing = FALSE;
+        gtk_window_set_focus (GTK_WINDOW (browser),
+            gtk_bin_get_child (GTK_BIN (view)) ?
+            gtk_bin_get_child (GTK_BIN (view)) : view);
         return TRUE;
     }
 
@@ -1597,8 +1600,14 @@ static void
 midori_browser_find_button_close_clicked_cb (GtkWidget*     widget,
                                              MidoriBrowser* browser)
 {
+    GtkWidget* view;
+
     gtk_widget_hide (browser->find);
     browser->find_typing = FALSE;
+    view = midori_browser_get_current_tab (browser);
+    gtk_window_set_focus (GTK_WINDOW (browser),
+        gtk_bin_get_child (GTK_BIN (view)) ?
+        gtk_bin_get_child (GTK_BIN (view)) : view);
 }
 
 static void