From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#47731: 28.0.50; Switching frame via keyboard does not fire focus change event Date: Thu, 6 May 2021 18:57:53 +0100 Message-ID: References: <875yzwyypp.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32168"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Sean Farley , 47731@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 06 20:15:53 2021 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 1leiXR-0008DY-5S for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 May 2021 20:15:53 +0200 Original-Received: from localhost ([::1]:58536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leiXQ-0001A1-50 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 May 2021 14:15:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leiHC-0003Z1-5F for bug-gnu-emacs@gnu.org; Thu, 06 May 2021 13:59:10 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55565) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1leiH8-0000qD-0N for bug-gnu-emacs@gnu.org; Thu, 06 May 2021 13:59:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1leiH7-00064v-Oy for bug-gnu-emacs@gnu.org; Thu, 06 May 2021 13:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 May 2021 17:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47731 X-GNU-PR-Package: emacs Original-Received: via spool by 47731-submit@debbugs.gnu.org id=B47731.162032388823351 (code B ref 47731); Thu, 06 May 2021 17:59:01 +0000 Original-Received: (at 47731) by debbugs.gnu.org; 6 May 2021 17:58:08 +0000 Original-Received: from localhost ([127.0.0.1]:38875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1leiGG-00064Z-1X for submit@debbugs.gnu.org; Thu, 06 May 2021 13:58:08 -0400 Original-Received: from outbound.soverin.net ([116.202.65.218]:52427) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1leiGD-000648-3V for 47731@debbugs.gnu.org; Thu, 06 May 2021 13:58:06 -0400 Original-Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 7FADC60109; Thu, 6 May 2021 17:57:58 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1620323877; bh=FfP0M+CmoVHrnBsPeTgqV0LaA83BbJiFSiB7lFNxepk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dvtCKbfVgP9NomRnLZTkswAcG3Ln8eucg+esCJ42arZvo9eujarWHi9EvvyHGuvXK lGeZB9bN//uJzpSp09cG5pc+ikdIxEWf8yE98T0AOu4ifu372uvNTnX8GuqUrvDTui rgEnwrbPdjnsiV29YbGkmt6QSTnOhkQNf6lUL1/qGI3NicEl0G1By1yRYUxwg6zm/s 5GCK4ki/chKRT1fiTC/hmQrpoOOdsSg4KNeVhY6r0PHrs3ERFmwcH3s95r/NIzsI/T WeTnIDtI1CAIZahuQu/CONwgHLT9jnbfDf1neG290/BbUv4W47/isxqaI4glf9ae/E kMKis7V5nn/zw== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94) (envelope-from ) id 1leiG1-0004W5-Eo; Thu, 06 May 2021 18:57:53 +0100 Mail-Followup-To: Alan Third , Lars Ingebrigtsen , Sean Farley , 47731@debbugs.gnu.org Content-Disposition: inline In-Reply-To: <875yzwyypp.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:205870 Archived-At: On Thu, May 06, 2021 at 11:54:10AM +0200, Lars Ingebrigtsen wrote: > Sean Farley writes: > > > Here is some testing code: > > (defun test--focus-out () > > (message "FOCUS TEST")) > > > > (add-function :after after-focus-change-function #'test--focus-out) > > (make-frame) > > > > On macOS, this code runs fine if you click on the other frame. But if > > using the keyboard shortcut Command-` the event doesn't fire. It seems > > to be some interaction in the keydown event function where emacs_event > > is cleared before the call to windowDidBecomeKey. > > I haven't tested the recipe, but perhaps Alan has some comments here > (added to the CCs). Interestingly the NS port only generates Emacs events for things that happen within the NS run loop, which excludes many things that are initiated by Emacs itself. I'm not sure how to fix this as I'm not sure why it's set up this way. -- Alan Third