X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/640d73877e44394a3c12c0aa2cf023c543933032..21cdf8c2848cdafd97523b6604909b02148fcb4f:/windows/wincfg.c diff --git a/windows/wincfg.c b/windows/wincfg.c index 574e1e8f..389eb38a 100644 --- a/windows/wincfg.c +++ b/windows/wincfg.c @@ -31,7 +31,7 @@ static void help_handler(union control *ctrl, void *dlg, } void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, - int midsession) + int midsession, int protocol) { struct controlset *s; union control *c; @@ -375,5 +375,18 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, /* * Serial back end is available on Windows. */ - ser_setup_config_box(b, midsession, 0x1F, 0x0F); + if (!midsession || (protocol == PROT_SERIAL)) + ser_setup_config_box(b, midsession, 0x1F, 0x0F); + + /* + * $XAUTHORITY is not reliable on Windows, so we provide a + * means to override it. + */ + if (!midsession && backend_from_proto(PROT_SSH)) { + s = ctrl_getset(b, "Connection/SSH/X11", "x11", "X11 forwarding"); + ctrl_filesel(s, "X authority file for local display", 't', + NULL, FALSE, "Select X authority file", + HELPCTX(ssh_tunnels_xauthority), + dlg_stdfilesel_handler, I(offsetof(Config, xauthfile))); + } }