aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorJan Djärv2012-08-15 20:58:19 +0200
committerJan Djärv2012-08-15 20:58:19 +0200
commitddee65158cd55a0c045a1ebc26f8ff73768cdc64 (patch)
tree3ec8cde41573810900d76832751badde8c57f41e /src/ChangeLog
parentac4845a68bf3ee0a0b4b88c292207d9738b981bd (diff)
downloademacs-ddee65158cd55a0c045a1ebc26f8ff73768cdc64.tar.gz
emacs-ddee65158cd55a0c045a1ebc26f8ff73768cdc64.zip
Improve event loop on NS so that no polling is used.
* nsmenu.m (popupSession): Remove. (pop_down_menu): Remove endModalSession. (timeout_handler:): New method. (runDialogAt:): Get next timeout. Start a NSTimer with that timeout. Call runModalForWindow. Check timer_fired when it returns. If not set, cancel timer and break out of loop. Otherwise loop again, with a new timeout. * nsterm.h (EmacsApp): fd_handler takes id argument. (EmacsDialogPanel): Add timer_fired and timeout_handler. * nsterm.m: Include fcntl.h if present. (fd_entry, t_readfds, inNsSelect): Remove. (select_writefds, select_valid, select_timeout, selfds) (select_mutex, apploopnr): Add. (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr. Otherwise call kbd_buffer_store_event. (ns_send_appdefined): Remove release of fd_entry. (ns_read_socket): Always send appdefined. Remove inNsSelect check. Increment and decrement apploopnr. (ns_select): If no file descriptors, just do a NSTimer. Otherwise copy read/write masks and start select thread (fd_handler). Start main loop and wait for application defined event. Inform select thread to stop selecting after main loop is exited. (ns_term_init): Create selfds pipe and set non-blocking. Initialize select_mutex. Start the select thread (fd_handler). (fd_handler:): Loop forever, wait for info from the main thread to either start or stop selecting. When select returns, send and appdefined event. (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set. If not call kbd_buffer_store_event.
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 04a0df774f9..6e49dd44fde 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,37 @@
12012-08-15 Jan Djärv <jan.h.d@swipnet.se> 12012-08-15 Jan Djärv <jan.h.d@swipnet.se>
2 2
3 * nsmenu.m (popupSession): Remove.
4 (pop_down_menu): Remove endModalSession.
5 (timeout_handler:): New method.
6 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
7 Call runModalForWindow. Check timer_fired when it returns.
8 If not set, cancel timer and break out of loop.
9 Otherwise loop again, with a new timeout.
10
11 * nsterm.m: Include fcntl.h if present.
12 (fd_entry, t_readfds, inNsSelect): Remove.
13 (select_writefds, select_valid, select_timeout, selfds)
14 (select_mutex, apploopnr): Add.
15 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
16 Otherwise call kbd_buffer_store_event.
17 (ns_send_appdefined): Remove release of fd_entry.
18 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
19 Increment and decrement apploopnr.
20 (ns_select): If no file descriptors, just do a NSTimer.
21 Otherwise copy read/write masks and start select thread (fd_handler).
22 Start main loop and wait for application defined event.
23 Inform select thread to stop selecting after main loop is exited.
24 (ns_term_init): Create selfds pipe and set non-blocking.
25 Initialize select_mutex. Start the select thread (fd_handler).
26 (fd_handler:): Loop forever, wait for info from the main thread
27 to either start or stop selecting. When select returns, send
28 and appdefined event.
29 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
30 If not call kbd_buffer_store_event.
31
32 * nsterm.h (EmacsApp): fd_handler takes id argument.
33 (EmacsDialogPanel): Add timer_fired and timeout_handler.
34
3 * gtkutil.c (xg_mark_data): Use FRAME_X_P. 35 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
4 36
52012-08-15 Eli Zaretskii <eliz@gnu.org> 372012-08-15 Eli Zaretskii <eliz@gnu.org>