summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2019-10-03 14:25:48 +0200
committerCarlos Garcia Campos <carlosgc@gnome.org>2019-10-03 14:28:45 +0200
commitcd77e3944e4ebb6789ae59153e0f66994613719f (patch)
tree3f5df270882c932609d2c964b5be453bd5a6f780
parent579e9ab4cc10f35b3974ec4f256f267e0c3c7eb1 (diff)
downloadepiphany-cd77e3944e4ebb6789ae59153e0f66994613719f.tar.gz
automation: focus the web view after creating it for automation
The focus is currently in the location entry because loads are not triggered by ephy.
-rw-r--r--src/ephy-shell.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index f62d62566..25157f975 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -431,10 +431,13 @@ create_web_view_for_automation_cb (WebKitAutomationSession *session,
embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
n_embeds = ephy_embed_container_get_n_children (EPHY_EMBED_CONTAINER (window));
web_view = ephy_embed_get_web_view (embed);
- if (n_embeds == 1 && ephy_web_view_get_visit_type (web_view) == EPHY_PAGE_VISIT_HOMEPAGE)
+ if (n_embeds == 1 && ephy_web_view_get_visit_type (web_view) == EPHY_PAGE_VISIT_HOMEPAGE) {
+ gtk_widget_grab_focus (GTK_WIDGET (embed));
return GTK_WIDGET (web_view);
+ }
embed = ephy_shell_new_tab (shell, window, NULL, EPHY_NEW_TAB_JUMP);
+ gtk_widget_grab_focus (GTK_WIDGET (embed));
return GTK_WIDGET (ephy_embed_get_web_view (embed));
}