From: Stefan Kangas <stefankangas@gmail.com>
To: Daniel Colascione <dancol@dancol.org>, 73559@debbugs.gnu.org
Subject: bug#73559: [PATCH] fix NS build focus-in event processing
Date: Sun, 29 Sep 2024 23:55:38 -0700 [thread overview]
Message-ID: <CADwFkmnkmMxdZMz0wFNznMwK+mgx0D+x7hbEfTGmPPtvqb7cyg@mail.gmail.com> (raw)
In-Reply-To: <871q113lil.fsf@dancol.org>
Daniel Colascione <dancol@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@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
> }
>
>
next prev parent reply other threads:[~2024-09-30 6:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 2:47 bug#73559: [PATCH] fix NS build focus-in event processing Daniel Colascione
2024-09-30 6:55 ` Stefan Kangas [this message]
2024-09-30 11:41 ` Eli Zaretskii
2024-09-30 14:20 ` Daniel Colascione
2024-09-30 15:38 ` Eli Zaretskii
2024-09-30 15:51 ` Daniel Colascione
2024-09-30 16:29 ` Eli Zaretskii
2024-09-30 17:05 ` Daniel Colascione
2024-09-30 17:40 ` Eli Zaretskii
2024-09-30 17:50 ` Daniel Colascione
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADwFkmnkmMxdZMz0wFNznMwK+mgx0D+x7hbEfTGmPPtvqb7cyg@mail.gmail.com \
--to=stefankangas@gmail.com \
--cc=73559@debbugs.gnu.org \
--cc=dancol@dancol.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).