order of stuff in main matters, oops

Terminal needs to be resized after g_spawn_async, not after.
This commit is contained in:
Simon Gomizelj 2012-09-03 03:26:41 -04:00
parent ce9fdb71d2
commit e027b88f30
1 changed files with 10 additions and 10 deletions

View File

@ -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();