foxygit / doom Log in
commit c93b2fb4d8d4879ab29d9ea578b6c02a23704f19
Author:     Simon Howard <fraggle@soulsphere.org>
AuthorDate: Wed Jan 25 22:46:10 2017 +0000
Commit:     Simon Howard <fraggle@soulsphere.org>
CommitDate: Wed Jan 25 22:46:10 2017 +0000

    textscreen: Activate window for file select.

    This pops up the file select dialog immediately rather than waiting for
    the user to activate the application. But really the current file select
    code for OS X based on AppleScript is garbage and should just be
    replaced.
---
 textscreen/txt_fileselect.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/textscreen/txt_fileselect.c b/textscreen/txt_fileselect.c
index fd3c488f..7c40cb33 100644
--- a/textscreen/txt_fileselect.c
+++ b/textscreen/txt_fileselect.c
@@ -329,6 +329,7 @@ char *TXT_SelectFile(char *window_title, char **extensions)

 #define APPLESCRIPT_WRAPPER \
     "tell application (path to frontmost application as text)\n" \
+    "    activate\n" \
     "    set theFile to (%s)\n" \
     "    copy POSIX path of theFile to stdout\n" \
     "end tell\n"