From f022a72a42ff80d9f268ba87caceec516535cb0b Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 22 Feb 2009 02:47:30 +0100 Subject: [PATCH] Focus the web view after cancelling an inline find --- midori/midori-browser.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- 2.39.5