diff options
Diffstat (limited to 'ui/gtk.c')
-rw-r--r-- | ui/gtk.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -992,13 +992,16 @@ static void gd_menu_switch_vc(GtkMenuItem *item, void *opaque) { GtkDisplayState *s = opaque; VirtualConsole *vc = gd_vc_find_by_menu(s); + GtkNotebook *nb = GTK_NOTEBOOK(s->notebook); + GtkWidget *child; gint page; gtk_release_modifiers(s); if (vc) { - page = gtk_notebook_page_num(GTK_NOTEBOOK(s->notebook), - vc->tab_item); - gtk_notebook_set_current_page(GTK_NOTEBOOK(s->notebook), page); + page = gtk_notebook_page_num(nb, vc->tab_item); + gtk_notebook_set_current_page(nb, page); + child = gtk_notebook_get_nth_page(nb, page); + gtk_widget_grab_focus(child); } } |