]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fx_file_dialog): Unblock input before falling back to minibuffer.
authorJason Rumney <jasonr@gnu.org>
Fri, 10 Jun 2005 23:03:28 +0000 (23:03 +0000)
committerJason Rumney <jasonr@gnu.org>
Fri, 10 Jun 2005 23:03:28 +0000 (23:03 +0000)
src/macfns.c
src/w32fns.c

index d0dd9b9c072b50daeebe9bbffc769dc05d86765d..b26baf3eaf75dafb507d9a0a176a0f9183afdf1f 100644 (file)
@@ -4375,14 +4375,15 @@ If ONLY-DIR-P is non-nil, the user can only select directories.  */)
          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;
index 23297ade5f3c3623354586f99f8203321f15ffc6..0e9e4509373f490443fb2a977395d30b2ce49f84 100644 (file)
@@ -7808,6 +7808,7 @@ If ONLY-DIR-P is non-nil, the user can only select directories.  */)
 
   {
     OPENFILENAME file_details;
+    BOOL file_opened = FALSE;
 
     /* Prevent redisplay.  */
     specbind (Qinhibit_redisplay, Qt);
@@ -7836,7 +7837,11 @@ If ONLY-DIR-P is non-nil, the user can only select directories.  */)
 
     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 @@ If ONLY-DIR-P is non-nil, the user can only select directories.  */)
                               dir, mustmatch, dir, Qfile_name_history,
                               default_filename, Qnil);
 
-    UNBLOCK_INPUT;
     file = unbind_to (count, file);
   }