Repository navigation
PuTTYNG puts itself into the tab - #30
Merged
Merged
Conversation
PuTTYNG (PuTTY with patches for embedding) takes -hwndparent and creates its window inside ours, without frame, so nothing has to be taken in, hidden or clipped, and no window of its own flashes up at the start. - launch::spawn_putty adds -hwndparent for a PuTTYNG going into a tab; embed::is_puttyng tells it by the internal name of its version information (renamed files too) or by the file name. - The programs folder prefers PuTTYNG.exe over putty.exe. - Embedded::try_attach looks among our own child windows first. Such a window keeps its style without WS_CHILD, as PuTTYNG's focus handling needs; it gets the keyboard by SetForegroundWindow, its thin border is cut off like PuTTY's frame, and As own window is not offered. - place() maps positions against our window, not GetParent, which is not our window for a window without the child style. - Our window handle is taken at start, so --open connect: and a restored session can pass it too. - The system check and Settings » Programs link to PuTTYNG's releases page when the PuTTY found is a plain one; nothing is downloaded or shipped. User guide in all five languages.
Modding
force-pushed
the
puttyng-embeds-itself
branch
from
November 30, 2026 02:19
c3c466b to
46905ab
Compare
This was referenced Nov 30, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
-hwndparent <window>it creates its window inside ours, without frame, and never puts a frame back: no taking in, no hide/show, no window of its own flashing up at the start.launch::spawn_puttyadds-hwndparentwhen the PuTTY found is a PuTTYNG and windows go into tabs.embed::is_puttyng/puts_itself_intell it by the internal name of its version information (a renamed file too) or by the file name.PuTTYNG.exeoverputty.exe(programs::PROGRAMS).Embedded::try_attachlooks among our own child windows first. PuTTYNG keeps its window withoutWS_CHILD(its focus handling needs that, see its patch), so it gets the keyboard bySetForegroundWindowinstead ofSetFocus; its 3 px border is cut off like PuTTY's frame (PuTTY stays steady in its tab and keeps the keyboard #28); As own window is not offered for it.place()maps positions against our window instead ofGetParent, which isn't our window for a window without the child style.CreationContext, so--open connect:and a restored session can pass it too (before, they started before the handle was known).src/embed.rsalso reads version information (namedunsafemodule).Tested
cargo fmt --check,cargo clippy --all-targets --locked -- -D warnings,cargo test --locked(139 tests). New:puttyng_gets_our_window_as_parent,puttyng_is_preferred_in_the_programs_folder(fails without the program list change).-hwndparent <our window>(checked on the process command line), also as a renamed copy (term.exe, told by its version information); plain PuTTY 0.85 gets no extra option;-pwfile). The new hint under the system check and the programs list is below the visible part of the--screenshotpictures, so it was not looked at.Accessibility
The new hint is a plain label and an egui link with its own text ("Download PuTTYNG"), reachable by keyboard like the other links; the address shows on hover. Keyboard focus goes into the PuTTYNG window when it is put into the tab, as for other embedded windows.