summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2005-06-10 23:03:28 +0000
committerJason Rumney <jasonr@gnu.org>2005-06-10 23:03:28 +0000
commitba6f3859e02ec8ff4b2d7ba179efa1ee3fb0243c (patch)
tree54d551377fded3ca01c90df3d3c7ec97dc1ebcfc
parent4b53b8d7eed13c7b1487c8afbc1246cd590e317d (diff)
downloademacs-ba6f3859e02ec8ff4b2d7ba179efa1ee3fb0243c.tar.gz
(Fx_file_dialog): Unblock input before falling back to minibuffer.
-rw-r--r--src/macfns.c3
-rw-r--r--src/w32fns.c8
2 files changed, 8 insertions, 3 deletions
diff --git a/src/macfns.c b/src/macfns.c
index d0dd9b9c072..b26baf3eaf7 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -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;
diff --git a/src/w32fns.c b/src/w32fns.c
index 23297ade5f3..0e9e4509373 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -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);
}