On Wed Nov 23 14:38:50 2022 +0000, eric pouech wrote:
for the title bits, just a wild guess:
- if the console title is set via CreateProcess STARTUPINFO.lpTitle then
the configuration is bound to the title
- otherwise the configuration is bound to the first process path
(AFAICS loading/storing configuration based on title is already present in window.c) you're right in Wine conhost / created process relationship can be tricky (to say the least):
$ wine cmd
both cmd.exe and conhost.exe are children of start.exe (and we'd expect to use cmd.exe and not start.exe for the configuration path, as they should be both attached to console)
$ wine programs/cmd/cmd.exe
conhost.exe is a child of cmd.exe (things are slightly different when allocating console at first with wineconsole) so picking the 'right' program may not be an easy task (note GetConsoleProcessList may help)
I've taken a different approach that supports process path and custom titles.