From e027b88f3012e4d4126bf9277ba486b0d83da89c Mon Sep 17 00:00:00 2001 From: Simon Gomizelj Date: Mon, 3 Sep 2012 03:26:41 -0400 Subject: [PATCH] order of stuff in main matters, oops Terminal needs to be resized after g_spawn_async, not after. --- termite.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/termite.cc b/termite.cc index 9d2e3b4..8f0f9e1 100644 --- a/termite.cc +++ b/termite.cc @@ -929,16 +929,6 @@ int main(int argc, char **argv) { g_free(geometry); } - int width, height, padding_w, padding_h; - long char_width = vte_terminal_get_char_width(vte); - long char_height = vte_terminal_get_char_height(vte); - - gtk_window_get_size(GTK_WINDOW(window), &width, &height); - get_vte_padding(vte, &padding_w, &padding_h); - vte_terminal_set_size(vte, - (width - padding_w) / char_width, - (height - padding_h) / char_height); - gtk_widget_grab_focus(vte_widget); gtk_widget_show_all(window); gtk_widget_hide(panel.panel); @@ -965,6 +955,16 @@ int main(int argc, char **argv) { return EXIT_FAILURE; } + int width, height, padding_w, padding_h; + long char_width = vte_terminal_get_char_width(vte); + long char_height = vte_terminal_get_char_height(vte); + + gtk_window_get_size(GTK_WINDOW(window), &width, &height); + get_vte_padding(vte, &padding_w, &padding_h); + vte_terminal_set_size(vte, + (width - padding_w) / char_width, + (height - padding_h) / char_height); + g_strfreev(env); gtk_main();