changeset 63297:431c88e4a3a2

(Fx_file_dialog): Unblock input before falling back to minibuffer.
author Jason Rumney <jasonr@gnu.org>
date Fri, 10 Jun 2005 23:03:28 +0000
parents 23220d47d573
children 44c92b4ef11a
files src/macfns.c src/w32fns.c
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/macfns.c	Fri Jun 10 22:59:17 2005 +0000
+++ b/src/macfns.c	Fri Jun 10 23:03:28 2005 +0000
@@ -4375,14 +4375,15 @@
 	  break;
 	}
       NavDialogDispose(dialogRef);
+      UNBLOCK_INPUT;
     }
     else {
+      UNBLOCK_INPUT;
       /* Fall back on minibuffer if there was a problem */
       file = Fcompleting_read (prompt, intern ("read-file-name-internal"),
 			       dir, mustmatch, dir, Qfile_name_history,
 			       default_filename, Qnil);
     }
-    UNBLOCK_INPUT;
   }
 
   UNGCPRO;
--- a/src/w32fns.c	Fri Jun 10 22:59:17 2005 +0000
+++ b/src/w32fns.c	Fri Jun 10 23:03:28 2005 +0000
@@ -7808,6 +7808,7 @@
 
   {
     OPENFILENAME file_details;
+    BOOL file_opened = FALSE;
 
     /* Prevent redisplay.  */
     specbind (Qinhibit_redisplay, Qt);
@@ -7836,7 +7837,11 @@
 
     file_details.lpfnHook = (LPOFNHOOKPROC) file_dialog_callback;
 
-    if (GetOpenFileName (&file_details))
+    file_opened = GetOpenFileName (&file_details);
+
+    UNBLOCK_INPUT;
+
+    if (file_opened)
       {
 	dostounix_filename (filename);
 	if (file_details.nFilterIndex == 2)
@@ -7857,7 +7862,6 @@
 			       dir, mustmatch, dir, Qfile_name_history,
 			       default_filename, Qnil);
 
-    UNBLOCK_INPUT;
     file = unbind_to (count, file);
   }