mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-21 22:28:37 -05: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:
parent
2b5b843849
commit
9ee6a220e0
@ -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;
|
int w, h, new_scale, need_size = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See if the terminal size has changed, in which case we must
|
* See if the terminal size has changed.
|
||||||
* let the terminal know.
|
|
||||||
*/
|
*/
|
||||||
w = (width - 2*inst->window_border) / inst->font_width;
|
w = (width - 2*inst->window_border) / inst->font_width;
|
||||||
h = (height - 2*inst->window_border) / inst->font_height;
|
h = (height - 2*inst->window_border) / inst->font_height;
|
||||||
if (w != inst->width || h != inst->height) {
|
if (w != inst->width || h != inst->height) {
|
||||||
|
/*
|
||||||
|
* Update conf.
|
||||||
|
*/
|
||||||
inst->width = w;
|
inst->width = w;
|
||||||
inst->height = h;
|
inst->height = h;
|
||||||
conf_set_int(inst->conf, CONF_width, inst->width);
|
conf_set_int(inst->conf, CONF_width, inst->width);
|
||||||
conf_set_int(inst->conf, CONF_height, inst->height);
|
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;
|
inst->drawing_area_setup_needed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user