about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJosh Rickmar <jrick@devio.us>2012-08-06 15:44:26 -0400
committerJosh Rickmar <jrick@devio.us>2012-08-06 15:44:26 -0400
commitcaf699f484d466a12f1829671d80dbabad297826 (patch)
tree405aec02f4b9a37389e7b2829049fdce330d4a24
parent69c102059fe76ad5a27d07a2081938a5c613b292 (diff)
downloadxombrero-caf699f484d466a12f1829671d80dbabad297826.tar.gz
Only hide when switching switching tabs
We need to hide t->cmd, t->oops, and t->buffers when creating a new
tab, because when the tab is switched to, they are automatically
hidden in the notebook callback.  Removing this also prevents focusing
the url GtkEntry when using middle click to create a new tab, since
t->focus_wv would not have been set to 1 yet in the create_new_tab()
function.
-rw-r--r--xombrero.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/xombrero.c b/xombrero.c
index 6b40e49..f8b3df9 100644
--- a/xombrero.c
+++ b/xombrero.c
@@ -7837,10 +7837,7 @@ create_new_tab(char *title, struct undo *u, int focus, int position)
 	} else
 		webkit_web_back_forward_list_clear(t->bfl);
 
-	/* hide stuff */
-	hide_cmd(t);
-	hide_oops(t);
-	hide_buffers(t);
+	/* check and show url and statusbar */
 	url_set_visibility();
 	statusbar_set_visibility();
 
@@ -7891,7 +7888,12 @@ notebook_switchpage_cb(GtkNotebook *nb, GtkWidget *nbp, guint pn,
 
 			hide_cmd(t);
 			hide_oops(t);
+			hide_buffers(t);
 
+			if (t->focus_wv) {
+				/* can't use focus_webview here */
+				gtk_widget_grab_focus(GTK_WIDGET(t->wv));
+			}
 			update_statusbar_tabs(t);
 			break;
 		}