From e8e07100e812676ddaf9b228dbfde182159126ac Mon Sep 17 00:00:00 2001 From: mutantturkey Date: Fri, 23 Apr 2010 15:21:33 -0400 Subject: fixed autofocus on current tab in tab_close --- mt.c | 5 +++-- 1 file 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)); } -- cgit v1.2.3