all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Colascione <dancol@dancol.org>
To: Eli Zaretskii <eliz@gnu.org>, Po Lu <luangruo@yahoo.com>
Cc: 73559@debbugs.gnu.org
Subject: bug#73559: [PATCH] fix NS build focus-in event processing
Date: Mon, 30 Sep 2024 07:20:26 -0700	[thread overview]
Message-ID: <C0724FD5-59BE-451D-8947-06BD4CD6015F@dancol.org> (raw)
In-Reply-To: <86v7yd2wsi.fsf@gnu.org>



On September 30, 2024 4:41:49 AM PDT, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Daniel Colascione <dancol@dancol.org>
>> Date: Sun, 29 Sep 2024 22:47:46 -0400
>> 
>> 
>> 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.
>
>Hmm... isn't this the same on all other GUI systems?
>kbd_buffer_store_event adds the event to the Emacs input queue, and
>AFAIU it will be processed as soon as Emacs gets back to its main loop
>and calls read_char.  No other event should be needed, AFAIK.  Po Lu,
>am I missing something here?
>
>> 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.

I don't recall what we do for other systems, but for NS, we don't wake up the event loop as a side effect of kbd_buffer_store_event by itself. We rely on something else waking up the loop draining events from the queue. Changing the kbd_buffer_store_to_event to wake the main thread unconditionally would be another option, but seemed like a bigger change.



>
>I know nothing about the "NS event loop", so I'm probably missing
>something.
>



>Thanks.





  reply	other threads:[~2024-09-30 14:20 UTC|newest]

Thread overview: 11+ 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
2024-09-30 11:41 ` Eli Zaretskii
2024-09-30 14:20   ` Daniel Colascione [this message]
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
2024-10-05 10:37                 ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C0724FD5-59BE-451D-8947-06BD4CD6015F@dancol.org \
    --to=dancol@dancol.org \
    --cc=73559@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=luangruo@yahoo.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.