aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormutantturkey <crazycal00@gmail.com>2010-04-23 15:21:33 -0400
committermutantturkey <crazycal00@gmail.com>2010-04-23 15:21:33 -0400
commite8e07100e812676ddaf9b228dbfde182159126ac (patch)
treef9fde18e83f72bf47f0eee269a8e3de9c8cdbe8a
parent5bfe6f02178eeb5f8fab6cf03e3af683e5d6d8db (diff)
fixed autofocus on current tab in tab_close
-rw-r--r--mt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mt.c b/mt.c
index 373f904..8188dc3 100644
--- a/mt.c
+++ b/mt.c
@@ -81,9 +81,10 @@ static void tab_close() {
gtk_widget_hide(t->vte);
gtk_notebook_remove_page(GTK_NOTEBOOK(mt.notebook), page);
+ page = gtk_notebook_get_current_page(GTK_NOTEBOOK(mt.notebook));
g_free(t);
- if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(mt.notebook)) == 0) { quit(); }
-
+ if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(mt.notebook)) == 0) { quit(); }
+ gtk_widget_grab_focus(gtk_notebook_get_nth_page(GTK_NOTEBOOK(mt.notebook), page));
}