GNU bug report logs - #73559
[PATCH] fix NS build focus-in event processing

Previous Next

Package: emacs;

Reported by: Daniel Colascione <dancol <at> dancol.org>

Date: Mon, 30 Sep 2024 03:30:15 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 73559 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Daniel Colascione <dancol <at> dancol.org>, 73559 <at> debbugs.gnu.org
Subject: Re: bug#73559: [PATCH] fix NS build focus-in event processing
Date: Sun, 29 Sep 2024 23:55:38 -0700
Daniel Colascione <dancol <at> dancol.org> writes:

> In Emacs NS build, frames don't respond to focus-in events right away.
> Instead, they store the focus-in event and process it (and other queued
> events) whenever some other event happens to occur on that frame.
>
> This patch kicks the NS event loop immediately when a focus-in event
> happens, allowing Emacs to respond to focus-in events without some other
> event triggering the processing.

Thanks for the patch.

Please always send patches as attachments if possible, as formatted by

    git format-patch -1

> commit c6d98bfc2a098b57fa9631978224ead2668d3a88
> Author: Daniel Colascione <dancol <at> dancol.org>
> Date:   Wed Aug 21 19:48:05 2024 -0700
>
>     process events on focus in
>
> diff --git a/src/nsterm.m b/src/nsterm.m
> index 8c405738467..f68a22d9fbc 100644
> --- a/src/nsterm.m
> +++ b/src/nsterm.m
> @@ -7973,6 +7973,7 @@ - (void)windowDidBecomeKey      /* for direct calls */
>    event.kind = FOCUS_IN_EVENT;
>    XSETFRAME (event.frame_or_window, emacsframe);
>    kbd_buffer_store_event (&event);
> +  ns_send_appdefined (-1);  // Kick main loop
>  }
>
>




This bug report was last modified 230 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.