From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#34213: 27.0.50; Menu bar requires 2 clicks, is unresponsive, or has delays on macOS Mojave Date: Mon, 6 Apr 2020 19:54:08 +0100 Message-ID: <20200406185408.GA44546@breton.holly.idiocy.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="42184"; mail-complaints-to="usenet@ciao.gmane.io" Cc: iqgrande@gmail.com, 34213@debbugs.gnu.org To: David Hart Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 06 20:55:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLWtq-000Aq5-LV for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Apr 2020 20:55:10 +0200 Original-Received: from localhost ([::1]:37198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLWtp-0003DC-OI for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Apr 2020 14:55:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49992) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLWtj-0003D4-6B for bug-gnu-emacs@gnu.org; Mon, 06 Apr 2020 14:55:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLWti-0001ZO-9q for bug-gnu-emacs@gnu.org; Mon, 06 Apr 2020 14:55:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37692) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLWti-0001ZK-6q for bug-gnu-emacs@gnu.org; Mon, 06 Apr 2020 14:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jLWti-0006vH-64 for bug-gnu-emacs@gnu.org; Mon, 06 Apr 2020 14:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Apr 2020 18:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34213 X-GNU-PR-Package: emacs Original-Received: via spool by 34213-submit@debbugs.gnu.org id=B34213.158619925626486 (code B ref 34213); Mon, 06 Apr 2020 18:55:02 +0000 Original-Received: (at 34213) by debbugs.gnu.org; 6 Apr 2020 18:54:16 +0000 Original-Received: from localhost ([127.0.0.1]:49238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLWsy-0006t7-HQ for submit@debbugs.gnu.org; Mon, 06 Apr 2020 14:54:16 -0400 Original-Received: from idiocy.org ([217.169.17.33]:55235 helo=breton.holly.idiocy.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLWsw-0006sb-QU for 34213@debbugs.gnu.org; Mon, 06 Apr 2020 14:54:15 -0400 Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id 42B802021A36B6; Mon, 6 Apr 2020 19:54:08 +0100 (BST) Mail-Followup-To: Alan Third , David Hart , iqgrande@gmail.com, 34213@debbugs.gnu.org Content-Disposition: inline In-Reply-To: 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:178101 Archived-At: On Mon, Apr 06, 2020 at 03:19:25AM -0700, David Hart wrote: > The mechanism used in the ns port of emacs to cancel menu tracking, and to > post a CGEvent to resume it after menus have been updated via lisp no > longer works on recent macOS versions. > > The cause of this bug is due to Apple tightening security in macOS, and no > longer allowing apps to post arbitrary CGEvents to the system. > > You can observe a console message on macOS Catalina when the first click > fails: "Sender is prohibited from synthesizing events". > > A proposed fix is included inline below, using a newer API > 'CGEventPostToPid' instead of CGEventPost. The newer API accepts a pid > specifying the recipient, and when the recipient is the same pid as the > sending process, the event gets posted successfully. Hi, thanks for looking into this. Unfortunately your fix doesn’t work for me here on macOS 10.14. Which version of macOS did you test it on? -- Alan Third