diff options
author | Adrian Robert <[email protected]> | 2009-02-04 11:31:28 +0000 |
---|---|---|
committer | Adrian Robert <[email protected]> | 2009-02-04 11:31:28 +0000 |
commit | c96169a0b1f1725f42ad0e2958599d2fd2929ec6 (patch) | |
tree | 47c4b32fba34862b221c3cc89822d44a1bfde07e /src/keyboard.c | |
parent | 22b5692c3d5921910c1d9b3bf4b5fffb155694e7 (diff) |
* nsmenu.m (pop_down_menu): New function.
(ns_popup_dialog): Call it on unwind.
(EmacsDialogPanel-runDialogAt:): Check popup_activated_flag and
call timer_check() (Bug#2154).
(EmacsMenu-menuNeedsUpdate:): Don't call ns_update_menu if
handling_signal is set.
(EmacsMenu-fillWithWidgetValue:): Set submenu title.
* s/darwin.h: Same and NO_SOCK_SIGIO as well.
* nsterm.m (ns_read_socket): Same and don't set handling_signal.
* keyboard.c (poll_for_input_1, handle_async_input): Set
handling_signal under HAVE_NS.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r-- | src/keyboard.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index e5d0896100..8b411fdac8 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2182,16 +2182,24 @@ struct atimer *poll_timer; #ifdef POLL_FOR_INPUT -/* Poll for input, so what we catch a C-g if it comes in. This +/* Poll for input, so that we catch a C-g if it comes in. This function is called from x_make_frame_visible, see comment there. */ void poll_for_input_1 () { +/* Tell ns_read_socket() it is being called asynchronously so it can avoid + doing anything dangerous. */ +#ifdef HAVE_NS + ++handling_signal; +#endif if (interrupt_input_blocked == 0 && !waiting_for_input) read_avail_input (0); +#ifdef HAVE_NS + --handling_signal; +#endif } /* Timer callback function for poll_timer. TIMER is equal to @@ -7276,7 +7284,11 @@ handle_async_input () #ifdef SYNC_INPUT pending_signals = pending_atimers; #endif - +/* Tell ns_read_socket() it is being called asynchronously so it can avoid + doing anything dangerous. */ +#ifdef HAVE_NS + ++handling_signal; +#endif while (1) { int nread; @@ -7287,6 +7299,9 @@ handle_async_input () if (nread <= 0) break; } +#ifdef HAVE_NS + --handling_signal; +#endif } void |