diff options
Diffstat (limited to 'src/nsfns.m')
| -rw-r--r-- | src/nsfns.m | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/nsfns.m b/src/nsfns.m index dea51bdba00..d693873d422 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -1310,7 +1310,10 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, | |||
| 1310 | 1310 | ||
| 1311 | f->output_data.ns->in_animation = NO; | 1311 | f->output_data.ns->in_animation = NO; |
| 1312 | 1312 | ||
| 1313 | f->output_data.ns->frame = [[EmacsFrame alloc] initWithEmacsframe:f]; | 1313 | f->output_data.ns->frame = |
| 1314 | [(EmacsFrame *)[[[MainThreadProxy alloc] initWithObject:[EmacsFrame alloc] | ||
| 1315 | waitUntilDone:YES] autorelease] | ||
| 1316 | initWithEmacsframe:f]; | ||
| 1314 | 1317 | ||
| 1315 | ns_icon (f, parms); | 1318 | ns_icon (f, parms); |
| 1316 | 1319 | ||
| @@ -2141,7 +2144,6 @@ In case the execution fails, an error is signaled. */) | |||
| 2141 | Lisp_Object result; | 2144 | Lisp_Object result; |
| 2142 | int status; | 2145 | int status; |
| 2143 | NSEvent *nxev; | 2146 | NSEvent *nxev; |
| 2144 | struct input_event ev; | ||
| 2145 | 2147 | ||
| 2146 | CHECK_STRING (script); | 2148 | CHECK_STRING (script); |
| 2147 | check_window_system (NULL); | 2149 | check_window_system (NULL); |
| @@ -2167,13 +2169,6 @@ In case the execution fails, an error is signaled. */) | |||
| 2167 | 2169 | ||
| 2168 | [NSApp postEvent: nxev atStart: NO]; | 2170 | [NSApp postEvent: nxev atStart: NO]; |
| 2169 | 2171 | ||
| 2170 | /* If there are other events, the event loop may exit. Keep running | ||
| 2171 | until the script has been handled. */ | ||
| 2172 | ns_init_events (&ev); | ||
| 2173 | while (! NILP (as_script)) | ||
| 2174 | [NSApp run]; | ||
| 2175 | ns_finish_events (); | ||
| 2176 | |||
| 2177 | status = as_status; | 2172 | status = as_status; |
| 2178 | as_status = 0; | 2173 | as_status = 0; |
| 2179 | as_result = 0; | 2174 | as_result = 0; |