From: Daniel Carl Date: Sat, 9 Nov 2013 00:18:23 +0000 (+0100) Subject: Removed duplicate gtk_widget_show_all. X-Git-Url: https://git.owens.tech///git?a=commitdiff_plain;h=8c4b82a20d348f0d9cfbc403851410072b066fb9;p=vimb.git Removed duplicate gtk_widget_show_all. This increases the startup time a little. --- diff --git a/src/main.c b/src/main.c index addcede..b56ee72 100644 --- a/src/main.c +++ b/src/main.c @@ -622,7 +622,6 @@ static void init_core(void) gui->eventbox = gtk_event_box_new(); gtk_paned_pack1(GTK_PANED(gui->pane), GTK_WIDGET(gui->box), true, true); - gtk_widget_show_all(gui->window); /* Put all part together */ gtk_container_add(GTK_CONTAINER(gui->scroll), GTK_WIDGET(gui->webview)); @@ -641,10 +640,6 @@ static void init_core(void) setup_signals(); - /* Make sure that when the browser area becomes visible, it will get mouse - * and keyboard events */ - gtk_widget_grab_focus(GTK_WIDGET(gui->webview)); - /* initialize the modes */ mode_init(); mode_add('n', normal_enter, normal_leave, normal_keypress, NULL); @@ -661,6 +656,7 @@ static void init_core(void) /* initially apply input style */ vb_update_input_style(); + /* make sure the main window and all its contents are visible */ gtk_widget_show_all(gui->window); } diff --git a/src/normal.c b/src/normal.c index 9de67b9..21ec070 100644 --- a/src/normal.c +++ b/src/normal.c @@ -215,6 +215,8 @@ static char showcmd_buf[SHOWCMD_LEN + 1]; /* buffer to show ambiguous key sequ void normal_enter(void) { dom_clear_focus(vb.gui.webview); + /* Make sure that when the browser area becomes visible, it will get mouse + * and keyboard events */ gtk_widget_grab_focus(GTK_WIDGET(vb.gui.webview)); hints_clear(); }