fix the resizing issue in termite

Manually calculate the vte's size from the windows dimensions before
displaying it.
This commit is contained in:
Simon Gomizelj 2012-06-20 17:28:15 -04:00
parent 1246b64518
commit d76afec3d7
1 changed files with 10 additions and 0 deletions

View File

@ -811,6 +811,16 @@ 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);