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 #29 received at 73559 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Colascione <dancol <at> dancol.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, 73559 <at> debbugs.gnu.org
Subject: Re: bug#73559: [PATCH] fix NS build focus-in event processing
Date: Mon, 30 Sep 2024 10:50:31 -0700

On September 30, 2024 10:40:57 AM PDT, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> Date: Mon, 30 Sep 2024 10:05:09 -0700
>> From: Daniel Colascione <dancol <at> dancol.org>
>> CC: luangruo <at> yahoo.com, 73559 <at> debbugs.gnu.org
>> 
>> It's not that the NS pselect waits too long. It's that it doesn't know to wake up. The focus event is delivered to Emacs by NS as a callback. Unless that callback, one way or another, takes some action to wake up the event loop, nothing gets processed. On Windows, we drain the event queue as a side effect of the message pump, whereas on NS there doesn't seem to be a separate pump that works this way -- just a callback.
>
>What about making pselect wait on one more descriptor, to which the
>callback could then write?

That's the moral equivalent of what my patch does. My patch just uses the existing machinery for waking the main thread instead of adding a new FD.




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.