aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-find-toolbar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ephy-find-toolbar.c')
-rw-r--r--src/ephy-find-toolbar.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ephy-find-toolbar.c b/src/ephy-find-toolbar.c
index 041a4f85c..0805c31d2 100644
--- a/src/ephy-find-toolbar.c
+++ b/src/ephy-find-toolbar.c
@@ -214,6 +214,21 @@ tab_search_key_press_cb (EphyEmbed *embed,
return retval && (oldhash != newhash || priv->preedit_changed) && !priv->activated;
}
+static gboolean
+tab_dom_mouse_click_cb (EphyEmbed *embed,
+ gpointer event,
+ EphyFindToolbar *toolbar)
+{
+ EphyFindToolbarPrivate *priv = toolbar->priv;
+
+ if (!priv->explicit_focus)
+ {
+ ephy_find_toolbar_close (toolbar);
+ }
+
+ return FALSE;
+}
+
#endif /* HAVE_TYPEAHEADFIND */
static void
@@ -598,6 +613,9 @@ ephy_find_toolbar_set_embed (EphyFindToolbar *toolbar,
g_signal_connect_object (embed, "ge-search-key-press",
G_CALLBACK (tab_search_key_press_cb),
toolbar, 0);
+ g_signal_connect_object (embed, "dom-mouse-click",
+ G_CALLBACK (tab_dom_mouse_click_cb),
+ toolbar, 0);
#endif
if (priv->find != NULL)