Merge branch 'v4.8.x' into master
[xboard.git] / gtk / xboard.c
index 3588c9d..dbcc9e5 100644 (file)
@@ -1930,7 +1930,7 @@ void MoveTypeInProc(eventkey)
 
     buf[0]=eventkey->keyval;
     buf[1]='\0';
-    if (eventkey->keyval > 32 && eventkey->keyval < 256)
+    if (eventkey->keyval > 32 && eventkey->keyval < 256 || *buf == 27)
        ConsoleAutoPopUp (buf);
 }
 
@@ -2321,6 +2321,12 @@ void FileNamePopUpWrapper(label, def, filter, proc, pathFlag, openMode, name, fp
 
   StartDir(filter, NULL); // change to start directory for this file type
 
+  if(def && *def && def[strlen(def)-1] == '/') {
+    getcwd(curDir, MSG_SIZ);
+    chdir(def);
+  }
+
+
   /* make a copy of the filter string, so that strtok can work with it*/
   cp = strdup(filter);