diff options
| author | Jason Rumney | 2005-06-10 23:03:28 +0000 |
|---|---|---|
| committer | Jason Rumney | 2005-06-10 23:03:28 +0000 |
| commit | ba6f3859e02ec8ff4b2d7ba179efa1ee3fb0243c (patch) | |
| tree | 54d551377fded3ca01c90df3d3c7ec97dc1ebcfc /src | |
| parent | 4b53b8d7eed13c7b1487c8afbc1246cd590e317d (diff) | |
| download | emacs-ba6f3859e02ec8ff4b2d7ba179efa1ee3fb0243c.tar.gz emacs-ba6f3859e02ec8ff4b2d7ba179efa1ee3fb0243c.zip | |
(Fx_file_dialog): Unblock input before falling back to minibuffer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/macfns.c | 3 | ||||
| -rw-r--r-- | src/w32fns.c | 8 |
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. */) | |||
| 4375 | break; | 4375 | break; |
| 4376 | } | 4376 | } |
| 4377 | NavDialogDispose(dialogRef); | 4377 | NavDialogDispose(dialogRef); |
| 4378 | UNBLOCK_INPUT; | ||
| 4378 | } | 4379 | } |
| 4379 | else { | 4380 | else { |
| 4381 | UNBLOCK_INPUT; | ||
| 4380 | /* Fall back on minibuffer if there was a problem */ | 4382 | /* Fall back on minibuffer if there was a problem */ |
| 4381 | file = Fcompleting_read (prompt, intern ("read-file-name-internal"), | 4383 | file = Fcompleting_read (prompt, intern ("read-file-name-internal"), |
| 4382 | dir, mustmatch, dir, Qfile_name_history, | 4384 | dir, mustmatch, dir, Qfile_name_history, |
| 4383 | default_filename, Qnil); | 4385 | default_filename, Qnil); |
| 4384 | } | 4386 | } |
| 4385 | UNBLOCK_INPUT; | ||
| 4386 | } | 4387 | } |
| 4387 | 4388 | ||
| 4388 | UNGCPRO; | 4389 | 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. */) | |||
| 7808 | 7808 | ||
| 7809 | { | 7809 | { |
| 7810 | OPENFILENAME file_details; | 7810 | OPENFILENAME file_details; |
| 7811 | BOOL file_opened = FALSE; | ||
| 7811 | 7812 | ||
| 7812 | /* Prevent redisplay. */ | 7813 | /* Prevent redisplay. */ |
| 7813 | specbind (Qinhibit_redisplay, Qt); | 7814 | specbind (Qinhibit_redisplay, Qt); |
| @@ -7836,7 +7837,11 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 7836 | 7837 | ||
| 7837 | file_details.lpfnHook = (LPOFNHOOKPROC) file_dialog_callback; | 7838 | file_details.lpfnHook = (LPOFNHOOKPROC) file_dialog_callback; |
| 7838 | 7839 | ||
| 7839 | if (GetOpenFileName (&file_details)) | 7840 | file_opened = GetOpenFileName (&file_details); |
| 7841 | |||
| 7842 | UNBLOCK_INPUT; | ||
| 7843 | |||
| 7844 | if (file_opened) | ||
| 7840 | { | 7845 | { |
| 7841 | dostounix_filename (filename); | 7846 | dostounix_filename (filename); |
| 7842 | if (file_details.nFilterIndex == 2) | 7847 | if (file_details.nFilterIndex == 2) |
| @@ -7857,7 +7862,6 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 7857 | dir, mustmatch, dir, Qfile_name_history, | 7862 | dir, mustmatch, dir, Qfile_name_history, |
| 7858 | default_filename, Qnil); | 7863 | default_filename, Qnil); |
| 7859 | 7864 | ||
| 7860 | UNBLOCK_INPUT; | ||
| 7861 | file = unbind_to (count, file); | 7865 | file = unbind_to (count, file); |
| 7862 | } | 7866 | } |
| 7863 | 7867 | ||