From a56cc0ec804b4481f6dfc1706d6bc8151d280fe9 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Thu, 21 Feb 2013 22:03:59 +0100 Subject: [PATCH] Fixed wrong mode if new window was opened. If there was opened a uri into a new window the first window kept in command mode. This caused that the normal mode keybindings did not work until was pressed. --- src/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index fa47b68..c6cc1e4 100644 --- a/src/main.c +++ b/src/main.c @@ -327,6 +327,10 @@ gboolean vp_load_uri(const Arg* arg) } else { uri = g_strrstr(path, "://") ? g_strdup(path) : g_strdup_printf("http://%s", path); } + + /* change state to normal mode */ + vp_set_mode(VP_MODE_NORMAL, FALSE); + if (arg->i == VP_TARGET_NEW) { char *argv[64]; @@ -346,9 +350,6 @@ gboolean vp_load_uri(const Arg* arg) /* spawn a new browser instance */ g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL); } else { - /* change state to normal mode */ - vp_set_mode(VP_MODE_NORMAL, FALSE); - /* Load a web page into the browser instance */ webkit_web_view_load_uri(vp.gui.webview, uri); } -- 2.20.1