The Windows config option to point at an X authority file is only
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 3 Feb 2009 21:22:52 +0000 (21:22 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 3 Feb 2009 21:22:52 +0000 (21:22 +0000)
read at connection setup time, so don't offer it in the Change
Settings dialog box.

(In particular, this fixes an assertion failure when selecting
Change Settings on a non-SSH connection, since wincfg.c would have
added that control to Connection/SSH/X11 when the parent panel
Connection/SSH didn't exist. Making the control conditional on the
selected protocol would have been sufficient to fix that failure,
but I now realise that the setting should never have been presented
in mid-session in any case.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@8443 cda61777-01e9-0310-a592-d414129be87e

windows/wincfg.c

index d3201c4..389eb38 100644 (file)
@@ -382,7 +382,7 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help,
      * $XAUTHORITY is not reliable on Windows, so we provide a
      * means to override it.
      */
-    if (backend_from_proto(PROT_SSH)) {
+    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",