From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#31371: 26.1; Menu-bar stops working after search Date: Fri, 11 Oct 2019 13:25:06 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="230505"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Alan Third , 31371@debbugs.gnu.org To: Nick Helm Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 11 13:28:51 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iIt6H-000xm4-Ub for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Oct 2019 13:28:50 +0200 Original-Received: from localhost ([::1]:48712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIt6G-00084C-DY for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Oct 2019 07:28:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44261) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIt3b-00054P-9g for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2019 07:26:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iIt3a-0005Ms-3j for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2019 07:26:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49278) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iIt3a-0005Me-0h for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2019 07:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iIt3Z-0001MY-Qg for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2019 07:26:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Oct 2019 11:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31371 X-GNU-PR-Package: emacs Original-Received: via spool by 31371-submit@debbugs.gnu.org id=B31371.15707931275162 (code B ref 31371); Fri, 11 Oct 2019 11:26:01 +0000 Original-Received: (at 31371) by debbugs.gnu.org; 11 Oct 2019 11:25:27 +0000 Original-Received: from localhost ([127.0.0.1]:58097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIt31-0001L7-6O for submit@debbugs.gnu.org; Fri, 11 Oct 2019 07:25:27 -0400 Original-Received: from mail-pf1-f182.google.com ([209.85.210.182]:33238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIt2y-0001Kd-53 for 31371@debbugs.gnu.org; Fri, 11 Oct 2019 07:25:25 -0400 Original-Received: by mail-pf1-f182.google.com with SMTP id q10so5934282pfl.0 for <31371@debbugs.gnu.org>; Fri, 11 Oct 2019 04:25:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=VkVxZpxxF9eEmmkwVQnetyNUR+HaEd7WEyS0zi6yy5U=; b=gv8lmeAmInsL9ihz6ogyw58ymFAz9Kg9NLs9pNm+cJCEGrYK+S1PGBr6aZ42GyrZMg lUIb9VZ37K2SoJ7Yq6Lr8CnxkI05mDENKL+R9Tk6Mo5fBFSivhYHkneKy7YoZVnLTQM8 fjcnmlqORfJ7TL8z6PIp2FxKN4H/XLi7k2zjnALsA0Lqn1u9EPmQZPO94cJynL9BSq4k WrlNZ6VlW0/MxDmv5LBLt8GGUzhxbeDYUkX077iftaWTXTwTFLsiUz6Uews/hX9LZEFp SMFmXABBxjOTlDEATMb3Xb3zzNrM5bGsNsXgS9dkflpQXpnu3hKkZbBl3I9Fn+E8Vv5D LliA== X-Gm-Message-State: APjAAAW78GPxyyOmKcV8XArOM52cm7edTWCNKsUsze996rVTMDN8WYo1 ddBL+/B6U9jIQxQacGn987SR/R6T89LKTfsVwAs= X-Google-Smtp-Source: APXvYqy0vI5lPPBvc8G06inEdXiwzC+vabZ1EoKDWEMxq0NLxwlBGSIC9iEb01R+XV+PK4tqS44EuMsD9em+WQyWRIg= X-Received: by 2002:a63:1c03:: with SMTP id c3mr15770867pgc.198.1570793118181; Fri, 11 Oct 2019 04:25:18 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:168965 Archived-At: tags 31371 + patch quit Nick Helm 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