stdout and stderr should be made O_NONBLOCK so that we don't end up blocking
[u/mdw/putty] / windows / windlg.c
index db1ef2f..8235110 100644 (file)
@@ -322,7 +322,7 @@ static HTREEITEM treeview_insert(struct treeview_faff *faff,
     newitem = TreeView_InsertItem(faff->treeview, &ins);
     if (level > 0)
        TreeView_Expand(faff->treeview, faff->lastat[level - 1],
-                       TVE_EXPAND);
+                       (level > 1 ? TVE_COLLAPSE : TVE_EXPAND));
     faff->lastat[level] = newitem;
     for (i = level + 1; i < 4; i++)
        faff->lastat[i] = NULL;
@@ -843,6 +843,7 @@ int askalg(void *frontend, const char *algtype, const char *algname,
     title = dupprintf(mbtitle, appname);
     mbret = MessageBox(NULL, message, title,
                       MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2);
+    socket_reselect_all();
     sfree(message);
     sfree(title);
     if (mbret == IDYES)
@@ -875,6 +876,8 @@ int askappend(void *frontend, Filename filename,
     mbret = MessageBox(NULL, message, mbtitle,
                       MB_ICONQUESTION | MB_YESNOCANCEL | MB_DEFBUTTON3);
 
+    socket_reselect_all();
+
     sfree(message);
     sfree(mbtitle);
 
@@ -916,6 +919,8 @@ void old_keyfile_warning(void)
 
     MessageBox(NULL, msg, title, MB_OK);
 
+    socket_reselect_all();
+
     sfree(msg);
     sfree(title);
 }