Improve event loop on NS so that no polling is used.
[bpt/emacs.git] / src / ChangeLog
index eef02da..6e49dd4 100644 (file)
@@ -1,3 +1,124 @@
+2012-08-15  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * 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.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.
+
+       * nsterm.h (EmacsApp): fd_handler takes id argument.
+       (EmacsDialogPanel): Add timer_fired and timeout_handler.
+
+       * gtkutil.c (xg_mark_data): Use FRAME_X_P.
+
+2012-08-15  Eli Zaretskii  <eliz@gnu.org>
+
+       * region-cache.c (move_cache_gap): Update gap_len using the actual
+       growth of the boundaries array.  Do not change cache_len.
+       (Bug#12196)
+
+2012-08-15  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Generalize and cleanup font subsystem checks.
+       * font.h (FONT_DEBUG, font_assert): Remove.
+       * font.c, fontset.c, w32font.c, xfont.c, xftfont.c: Change
+       font_assert to eassert.  Use eassert where appropriate.
+
+2012-08-15  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * gtkutil.c (xg_get_font): Use pango_units_to_double.
+
+2012-08-15  Chong Yidong  <cyd@gnu.org>
+
+       * gtkutil.c (xg_get_font): Rename from xg_get_font_name.  When
+       using the new font chooser, use gtk_font_chooser_get_font_desc to
+       extract the font descriptor instead of just the font name.  In
+       that case, return a font spec instead of a string.
+       (x_last_font_name): Move to this file from xfns.c.
+
+       * xfns.c (Fx_select_font): The return value can also be a font
+       spec.  Move x_last_font_name management to gtkutil.c.
+
+       * xfaces.c: Make font weight and style symbols non-static.
+
+2012-08-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
+       (bug#12117).
+
+2012-08-14  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * alloc.c (Fgarbage_collect): Use plural form consistently.
+
+2012-08-14  Eli Zaretskii  <eliz@gnu.org>
+
+       * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
+       iteration through the command loop.  Fixes a problem whereby mouse
+       movements are ignored until the first mouse click.
+
+2012-08-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Use bool, not int, for Lisp booleans.
+       This is more natural, and on my platform (GCC 4.7.1 x86-64) it
+       makes Emacs a bit smaller and presumably a bit faster.
+       * lisp.h: Include <stdbool.h>.
+       (struct Lisp_Boolfwd, defvar_bool):
+       * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
+       * regex.c [!emacs]: Include <stdbool.h>.
+       (false, true): Remove; <stdbool.h> does this for us now.
+
+2012-08-14  Chong Yidong  <cyd@gnu.org>
+
+       * character.c (Fcharacterp): Doc fix (Bug#12076).
+
+       * data.c (Findirect_variable): Doc fix (Bug#11040).
+
+       * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
+
+       * editfns.c (Fformat): Doc fix (Bug#12059).
+       (Fsave_current_buffer): Doc fix (Bug#11542).
+
+2012-08-14  Barry OReilly  <gundaetiapo@gmail.com>  (tiny change)
+
+       * keyboard.c (access_keymap_keyremap): Accept anonymous functions
+       (bug#12022).
+
+2012-08-14  Martin Rudalics  <rudalics@gmx.at>
+
+       * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
+       (delete_frame, Fmake_frame_invisible, Ficonify_frame):
+       * minibuf.c (choose_minibuf_frame, read_minibuf):
+       * w32fns.c (x_create_tip_frame):
+       * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
+       Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
+
+2012-08-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * intervals.c (offset_intervals): Remove obsolete comment.
+
 2012-08-14  Andreas Schwab  <schwab@linux-m68k.org>
 
        * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.