Commit b9cb58a1 authored by Nalin Dahyabhai's avatar Nalin Dahyabhai

don't add the padding in when calculating the new window size.

* src/vteapp.c(resize_window): don't add the padding in when calculating the
	new window size.
parent 6ab10dbe
2003-08-12 nalin
* src/vteapp.c(resize_window): don't add the padding in when calculating
the new window size.
2003-08-12 nalin
* doc/reference/tmpl/vte.sgml: note that dimensions passed in with
the resize-window signal include padding (more of bug #119141).
......
......@@ -244,13 +244,17 @@ static void
resize_window(GtkWidget *widget, guint width, guint height, gpointer data)
{
VteTerminal *terminal;
gint owidth, oheight;
gint owidth, oheight, xpad, ypad;
if ((GTK_IS_WINDOW(data)) && (width >= 2) && (height >= 2)) {
terminal = VTE_TERMINAL(widget);
/* Take into account padding and border overhead. */
/* Take into account border overhead. */
gtk_window_get_size(GTK_WINDOW(data), &owidth, &oheight);
owidth -= terminal->char_width * terminal->column_count;
oheight -= terminal->char_height * terminal->row_count;
/* Take into account padding, which needn't be re-added. */
vte_terminal_get_padding(VTE_TERMINAL(widget), &xpad, &ypad);
owidth -= xpad;
oheight -= ypad;
gtk_window_resize(GTK_WINDOW(data),
width + owidth, height + oheight);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment