mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Fix lost C-g events in NS port under load
The NS port was incorrectly reading input events in ns_flush_display, storing them in a local variable that was never processed. This caused C-g (quit) events to be lost when Emacs was under heavy load, making it difficult to interrupt long-running operations. * src/nsterm.m (ns_flush_display): Pass NULL instead of a local variable to ns_read_socket_1, ensuring events are processed normally instead of being discarded. * etc/NEWS: Announce the fix.
This commit is contained in:
parent
d3c3bc7379
commit
bdefb88b2b
2 changed files with 9 additions and 4 deletions
5
etc/NEWS
5
etc/NEWS
|
|
@ -2001,6 +2001,11 @@ determined by the new user option 'pulse-face-duration'.
|
|||
|
||||
** Miscellaneous
|
||||
|
||||
---
|
||||
*** Fixed lost C-g events on NS port under heavy load.
|
||||
The NS port now no longer loses quits when redisplay happens frequently,
|
||||
for example, during certain kinds of heavy IO load.
|
||||
|
||||
---
|
||||
*** 'tooltip-mode' now shows tooltips after delay on TTY frames.
|
||||
Display of tooltips on text-only terminals now happens after
|
||||
|
|
|
|||
|
|
@ -5487,10 +5487,10 @@ ns_update_window_end (struct window *w, bool cursor_on_p,
|
|||
static void
|
||||
ns_flush_display (struct frame *f)
|
||||
{
|
||||
struct input_event ie;
|
||||
|
||||
EVENT_INIT (ie);
|
||||
ns_read_socket_1 (FRAME_TERMINAL (f), &ie, YES);
|
||||
/* Must pass NULL for hold_quit: otherwise,
|
||||
we lose quits under load because we discard what ends
|
||||
up in hold_quit. */
|
||||
ns_read_socket_1 (FRAME_TERMINAL (f), NULL, YES);
|
||||
}
|
||||
|
||||
/* This and next define (many of the) public functions in this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue