1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-25 01:02:24 +00:00

GTK: reinstate accidentally removed calls to term_size.

In commit 528513dde I absentmindedly replaced a write to the local
variable 'need_size' of drawing_area_setup with a write to
inst->drawing_area_setup_needed, imagining that they had the same
effect. But actually, need_size was doing two jobs and I only replaced
one of them: it was also the variable that indicated that the logical
terminal size had changed and so we had to call term_size() to make
the terminal.c data structures resize themselves appropriately. The
loss of that call also inhibited generation of SIGWINCH.
This commit is contained in:
Simon Tatham 2018-05-19 07:38:22 +01:00
parent 2b5b843849
commit 9ee6a220e0

View File

@ -636,16 +636,25 @@ static void drawing_area_setup(struct gui_data *inst, int width, int height)
int w, h, new_scale, need_size = 0;
/*
* See if the terminal size has changed, in which case we must
* let the terminal know.
* See if the terminal size has changed.
*/
w = (width - 2*inst->window_border) / inst->font_width;
h = (height - 2*inst->window_border) / inst->font_height;
if (w != inst->width || h != inst->height) {
/*
* Update conf.
*/
inst->width = w;
inst->height = h;
conf_set_int(inst->conf, CONF_width, inst->width);
conf_set_int(inst->conf, CONF_height, inst->height);
/*
* We'll need to tell terminal.c about the resize below.
*/
need_size = TRUE;
/*
* And we must refresh the window's backing image.
*/
inst->drawing_area_setup_needed = TRUE;
}