order of stuff in main matters, oops
Terminal needs to be resized after g_spawn_async, not after.
This commit is contained in:
parent
ce9fdb71d2
commit
e027b88f30
20
termite.cc
20
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();
|
||||
|
|
Loading…
Reference in New Issue