1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 09:27:59 +00:00
putty-source/unix
Simon Tatham 65639fbbe7 Fix duplicate call to term_resize_request_completed().
A KDE user observed that if you 'dock' a GTK PuTTY window to the side
of the screen (by dragging it to the RH edge, causing it to
half-maximise over the right-hand half of the display, similarly to
Windows), and then send a terminal resize sequence, then PuTTY fails
the assertion in term_resize_request_completed() which expects that an
unacknowledged resize request was currently in flight.

When drawing_area_setup() calls term_resize_request_completed() in
response to the inst->term_resize_notification_required flag, it
resets the inst->win_resize_pending flag, but doesn't reset
inst->term_resize_notification_required. As a result, the _next_ call
to drawing_area_setup will find that flag still set, and make a
duplicate call to term_resize_request_completed, after the terminal no
longer believes it's waiting for a response to a resize request. And
in this 'docked to the right-hand side of the display' state, KDE
apparently triggers two calls to drawing_area_setup() in quick
succession, making this bug manifest.

I could fix this by clearing inst->term_resize_notification_required.
But inspecting all the other call sites, it seems clear to me that my
original intention was for inst->term_resize_notification_required to
be a flag that's only meaningful if inst->win_resize_pending is set.
So I think a better fix is to conditionalise the check in
drawing_area_setup so that we don't even check
inst->term_resize_notification_required if !inst->win_resize_pending.

(cherry picked from commit fec6719a2b)
2023-04-19 14:28:36 +01:00
..
utils Implement AES-GCM using the @openssh.com protocol IDs. 2022-08-16 20:33:58 +01:00
agent-client.c Formatting: realign labels and case/default statements. 2022-08-03 20:48:46 +01:00
agent-socket.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
askpass.c Formatting: standardise on "func(\n", not "func\n(". 2022-08-03 20:48:46 +01:00
cliloop.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
CMakeLists.txt Reorganise the stubs collection. 2022-09-01 20:43:23 +01:00
columns.c GTK: fix y computation in align_next_to. 2022-09-06 11:39:01 +01:00
columns.h Improve the align_next_to mechanism. 2022-05-05 19:04:34 +01:00
config-gtk.c Replace integer context2 encoding in conf_editbox_handler. 2022-09-01 20:43:23 +01:00
config-unix.c Restructure dlgcontrol as a struct with an anon union. 2022-05-01 10:00:32 +01:00
console.c unix/console.c: add the same assertion again. 2022-09-07 20:21:11 +01:00
dialog.c Unix: stop accessing ctrl->fileselect for font selectors. 2022-10-28 17:49:59 +01:00
fd-socket.c New facility, platform_start_subprocess. 2022-09-01 20:43:23 +01:00
gss.c Unix static GSSAPI: fix an uninitialised structure field. 2022-09-17 07:55:05 +01:00
gtk-common.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
gtkcompat.h gtkcompat.h: fix GTK1 implementation of ref_sink. 2019-11-02 08:26:14 +00:00
gtkmisc.h Convert a lot of 'int' variables to 'bool'. 2018-11-03 13:45:00 +00:00
keygen-noise.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
local-proxy.c New facility, platform_start_subprocess. 2022-09-01 20:43:23 +01:00
main-gtk-application.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
main-gtk-simple.c Formatting: realign run-on parenthesised stuff. 2022-08-03 20:48:46 +01:00
network.c Formatting: realign labels and case/default statements. 2022-08-03 20:48:46 +01:00
no-gtk.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
noaskpass.c Better header comment for noaskpass.c. 2022-05-20 19:35:59 +01:00
noise.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
osxlaunch.c osxlaunch: stop setting DYLD_LIBRARY_PATH. 2017-12-20 10:04:02 +00:00
pageant.c setpgrp cmake check: use #if, not #if defined. 2022-09-19 11:40:12 +01:00
peerinfo.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
platform.h New facility, platform_start_subprocess. 2022-09-01 20:43:23 +01:00
plink.c Formatting: normalise back to 4-space indentation. 2022-08-03 20:48:46 +01:00
printing.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
procnet.c Generalise strbuf_catf() into put_fmt(). 2021-11-19 11:32:47 +00:00
psocks.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
psusan.c Merge be_*.c into one ifdef-controlled module. 2021-11-26 17:58:55 +00:00
pterm-config-xpm.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
pterm-xpm.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
pterm.bundle OS X makefile: stop depending on JHBUILD_PREFIX. 2017-11-26 11:45:48 +00:00
pterm.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
pterm.plist Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
pty.c Formatting: realign labels and case/default statements. 2022-08-03 20:48:46 +01:00
putty-config-xpm.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
putty-xpm.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
putty.bundle OS X makefile: stop depending on JHBUILD_PREFIX. 2017-11-26 11:45:48 +00:00
putty.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
putty.plist Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
serial.c Add memsets after allocation of all Backend implementors. 2021-10-30 17:28:28 +01:00
sftp.c Formatting: realign labels and case/default statements. 2022-08-03 20:48:46 +01:00
sftpserver.c Formatting: realign run-on parenthesised stuff. 2022-08-03 20:48:46 +01:00
sharing.c Pass an Interactor to new_connection(). 2021-10-30 18:19:56 +01:00
storage.c Fix a batch of resource leaks spotted by Coverity. 2022-09-07 14:28:52 +01:00
unicode.c Remove uni_tbl from struct unicode_data. 2022-06-01 09:28:25 +01:00
unifont.c Formatting: standardise on "func(\n", not "func\n(". 2022-08-03 20:48:46 +01:00
unifont.h Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
uppity.c Formatting: miscellaneous. 2022-08-03 20:48:46 +01:00
uxsel.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
window.c Fix duplicate call to term_resize_request_completed(). 2023-04-19 14:28:36 +01:00
x11.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
x11misc.h Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00