unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Nick Helm <nick@tenpoint.co.nz>
Cc: Alan Third <alan@idiocy.org>, 31371@debbugs.gnu.org
Subject: bug#31371: 26.1; Menu-bar stops working after search
Date: Fri, 11 Oct 2019 13:25:06 +0200	[thread overview]
Message-ID: <CADwFkm=BSM76cBjrc1YZ+Kf+G2JTi=W-m3NtmynfJ7b0QqytNg@mail.gmail.com> (raw)
In-Reply-To: <m2a7tep4rm.fsf@tenpoint.co.nz>

tags 31371 + patch
quit

Nick Helm <nick@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





  parent reply	other threads:[~2019-10-11 11:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-05 14:15 bug#31371: 26.1; Menu-bar stops working after search Nick Helm
2018-05-06 10:14 ` Alan Third
2018-05-07  2:48   ` Nick Helm
2018-05-08  5:24     ` Nick Helm
2018-05-08 21:40     ` Alan Third
2018-05-13 10:09       ` Nick Helm
2018-05-18 21:33 ` George Plymale II
2018-05-19  4:26   ` Nick Helm
2019-10-11 11:25 ` Stefan Kangas [this message]
2019-10-11 12:04   ` Robert Pluim
2019-10-14  1:50   ` Nick
2019-10-14 12:44     ` Stefan Kangas
2019-10-14 12:55       ` Robert Pluim
2019-10-14 13:14       ` Alan Third
2019-11-05 15:13         ` Stefan Kangas
2019-11-09 10:18           ` Stefan Kangas
2019-11-09 11:29             ` Alan Third
2019-12-31 10:29             ` Stefan Kangas

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='CADwFkm=BSM76cBjrc1YZ+Kf+G2JTi=W-m3NtmynfJ7b0QqytNg@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=31371@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    --cc=nick@tenpoint.co.nz \
    /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).