GNU bug report logs - #31371
26.1; [macOS] Menu-bar stops working after search

Previous Next

Package: emacs;

Reported by: Nick Helm <nick <at> tenpoint.co.nz>

Date: Sat, 5 May 2018 14:17:03 UTC

Severity: normal

Tags: patch

Found in version 26.1

Fixed in version 27.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Nick Helm <nick <at> tenpoint.co.nz>
Cc: Alan Third <alan <at> idiocy.org>, 31371 <at> debbugs.gnu.org
Subject: bug#31371: 26.1; Menu-bar stops working after search
Date: Fri, 11 Oct 2019 13:25:06 +0200
tags 31371 + patch
quit

Nick Helm <nick <at> tenpoint.co.nz> writes:

> I think I've worked out what's going on here. I've attached a patch -
> could you give it a try and see if works for you?
>
> When the user types in the search field, NSMenu looks for matching
> candidates by creating events to open each menu, trigger an update and
> read the results. If the search field already contains text, this
> happens as soon as the Help menu opens, either when the user clicks Help
> or mouse drags onto the Help menu.
>
> The code in ns_check_menu_open and ns_check_pending_open_menu that
> postpones mouse clicks (to fetch menus from Lisp) also tries to postpone
> these drag and search events. When it releases a delayed click on Help
> (even if the event wasn't a click to begin with), the menu reopens and
> the process loops.
>
> The attached patch gets around this by never postponing mouse drag or
> non-user mouse down events.

I've tried your patch on macOS 10.13, and it fixes the issues with the
help menu for me.  The code looks okay to me, but I don't know much
about Objective-C or macOS development, so it would be good if someone
else could review it too.

Nick, could you please provide a ChangeLog entry for these changes and
send them using "git format-patch -1"?  Details on how to do that well
are in the CONTRIBUTE file.  Thanks in advance.

Best regards,
Stefan Kangas




This bug report was last modified 5 years and 140 days ago.

Previous Next


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