GNU bug report logs - #56155
29.0.50; Options menu, toggle menu items not updated

Previous Next

Package: emacs;

Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Date: Thu, 23 Jun 2022 09:10:02 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 30.1

Done: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Po Lu <luangruo <at> yahoo.com>
To: Daniel Martín <mardani29 <at> yahoo.es>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Eli Zaretskii <eliz <at> gnu.org>, 56155 <at> debbugs.gnu.org,
 Stefan Kangas <stefan <at> marxist.se>
Subject: Re: bug#56155: 29.0.50; Options menu, toggle menu items not updated
Date: Wed, 29 Jun 2022 14:12:11 +0800
Daniel Martín <mardani29 <at> yahoo.es> writes:

> That's interesting.  Could you put a breakpoint on that C function on
> GNU/Linux to see if it's called, for example, when you close the menu?
> That may be the key difference between macOS and the other operating
> systems.  I don't have a GNU/Linux system at hand right now, but I can
> investigate if needed.
>
> (BTW, as an aside, getting a Lisp backtrace using LLDB on macOS is a bit
> time-consuming because of all the manual steps to print the pointer
> structures.  If I have time, I'd like to write an .lldbinit file with
> LLDB commands to make this process much simpler, although I don't know
> how many people are debugging Emacs using LLDB here.)

The problem is well known (to me, at least.)  [EmacsMenu
menuNeedsUpdate:] only updates the menu bar if it was actually "dirtied"
by a previous "shallow" update (see set_frame_menubar in nsmenu.m), but
that never happens when only the value of a toggle item changes.

The other window systems intercept button presses on the menu bar, and
run Lisp in the keyboard loop to update the menu bar, before pushing the
button press event back onto the event queue.  But I can't figure out
how to do that on NS, and [EmacsMenu menuNeedsUpdate:] is called too
often to not utilize the "dirty" flag.

If someone does find out how to intercept events that will open the menu
bar, then most of the NS menu bar updating logic can be thrown out the
window, which will resolve not just this problem, but several others as
well.




This bug report was last modified 1 year and 5 days ago.

Previous Next


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