mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-04 21:12:47 -05:00
Rationalisation of the system of frontend handles. Most modular bits
of PuTTY (terminal, backend, logctx etc) take a `void *' handle passed to them from the frontend, and used as a context for all their callbacks. Most of these point at the frontend structure itself (on platforms where this is meaningful), except that the handle passed to the backend has always pointed at the terminal because from_backend() was implemented in terminal.c. This has finally bitten Unix PuTTY, because both backend and logctx have been passing their respective and very different frontend handles to logevent(), so I've fixed it. from_backend() is now a function supplied by the _frontend_ itself, in all cases, and the frontend handle passed to backends must be the same as that passed to everything else. What was from_backend() in terminal.c is now called term_data(), and the typical implementation of from_backend() in a GUI frontend will just extract the terminal handle from the frontend structure and delegate to that. This appears to work on Unix and Windows, but has most likely broken the Mac build. [originally from svn r3100]
This commit is contained in:
@ -14,11 +14,15 @@
|
||||
/*
|
||||
* TODO:
|
||||
*
|
||||
* - Copy-and-paste from the Event Log.
|
||||
* - Go through all the config options and ensure they can all be
|
||||
* configured and reconfigured properly.
|
||||
*
|
||||
* - Remainder of the context menu:
|
||||
*
|
||||
* - New Session and Duplicate Session (perhaps in pterm, in fact?!)
|
||||
* - New Session, Duplicate Session and the Saved Sessions
|
||||
* submenu.
|
||||
* + at least New and Duplicate probably _should_ be in
|
||||
* pterm.
|
||||
* + Duplicate Session will be fun, since we must work out
|
||||
* how to pass the config data through.
|
||||
* + In fact this should be easier on Unix, since fork() is
|
||||
@ -42,10 +46,6 @@
|
||||
* already have dropped privileges by this point, so we
|
||||
* can't get another pty. Sigh. Looks like exec has to be
|
||||
* the way forward then :-/
|
||||
*
|
||||
* - Saved Sessions submenu (not in pterm of course)
|
||||
*
|
||||
* - Copy All to Clipboard (for what that's worth)
|
||||
*/
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user