mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-15 10:08:06 -05:00

This was used by ldisc to communicate back to the front end that a key had been pressed (or rather, that a keypress had caused a nonzero amount of session input data). Its only nontrivial implementation was in gtkwin.c, which used that notification to implement the Unix GUI's "close window on keypress, if the session was already over" policy. (Which in turn is Unix-specific, because the rationale is that sometimes X servers don't have a functioning window manager, so it's useful to have a way of telling any application to close without using WM-provided facilities like a close button.) But gtkwin.c doesn't need to be told by the ldisc that a keypress happened - it's the one _sending_ those keypresses to ldisc in the first place! So I've thrown away the three stub implementations of frontend_keypress, removed the call to it in ldisc.c, and replaced it with calls in gtkwin.c at all the points during keypress handling that call ldisc_send. A visible effect is that pterm's close-on-keypress behaviour will now only trigger on an actual (input-generating) _keypress_, and not on other input generation such as a paste action. I think that's an improvement.