From: Christian Dywan Date: Sun, 22 Feb 2009 01:47:30 +0000 (+0100) Subject: Focus the web view after cancelling an inline find X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f022a72a42ff80d9f268ba87caceec516535cb0b;p=midori Focus the web view after cancelling an inline find --- diff --git a/midori/midori-browser.c b/midori/midori-browser.c index c866ce69..ce4410e5 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -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