Fix window size when a second tab is added by drag-n-drop

based on gnome-terminal commit:
https://git.gnome.org/browse/gnome-terminal/commit/?id=d3e593e4974303618305da4e0d20f0d5c10f83b0
master-1.22
ZenWalker 2016-11-06 02:04:11 +01:00 committed by raveit65
parent 13bf77c21a
commit 2e6db62d1f
1 changed files with 3 additions and 0 deletions

View File

@ -3038,6 +3038,7 @@ notebook_page_added_callback (GtkWidget *notebook,
{ {
TerminalWindowPrivate *priv = window->priv; TerminalWindowPrivate *priv = window->priv;
TerminalScreen *screen; TerminalScreen *screen;
int pages;
screen = terminal_screen_container_get_screen (TERMINAL_SCREEN_CONTAINER (container)); screen = terminal_screen_container_get_screen (TERMINAL_SCREEN_CONTAINER (container));
@ -3096,6 +3097,8 @@ notebook_page_added_callback (GtkWidget *notebook,
gtk_window_present_with_time (GTK_WINDOW (window), gtk_get_current_event_time ()); gtk_window_present_with_time (GTK_WINDOW (window), gtk_get_current_event_time ());
priv->present_on_insert = FALSE; priv->present_on_insert = FALSE;
} }
pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook));
if (pages == 2) terminal_window_update_size (window, priv->active_screen, TRUE);
} }
static void static void