mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 09:27:59 +00:00
GTK: fix crash changing font size when terminal maximised.
When I maximised a terminal window today and then used Ctrl-< to reduce its font size (expecting that the window size would stay the same but more characters would be squeezed in), pterm failed the assertion in term_request_resize_completed() that checks term->win_resize_pending == WIN_RESIZE_AWAIT_REPLY. This happened because in this situation request_resize_internal() was called from within window.c rather than from within the terminal code itself. So the terminal didn't know a resize is pending at all, and was surprised to be told that one had finished. request_resize_internal() already has a flag parameter to tell it whether a given resize came from the terminal or not. On the main code path, that flag is used to decide whether to notify the terminal. But on the early exit path when the window is maximised, we weren't checking the flag. An easy fix.
This commit is contained in:
parent
c14f0e02cc
commit
95b926865a
@ -2609,7 +2609,8 @@ static void request_resize_internal(GtkFrontend *inst, bool from_terminal,
|
||||
#endif
|
||||
0)) {
|
||||
queue_toplevel_callback(gtkwin_deny_term_resize, inst);
|
||||
term_resize_request_completed(inst->term);
|
||||
if (from_terminal)
|
||||
term_resize_request_completed(inst->term);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user