From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Farley via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#47731: 28.0.50; Switching frame via keyboard does not fire focus change event Date: Sat, 28 Aug 2021 22:23:35 -0500 Message-ID: References: <875yzwyypp.fsf@gnus.org> Reply-To: Sean Farley Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8407"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.4; emacs 28.0.50 Cc: Lars Ingebrigtsen , 47731@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 29 05:25:11 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 1mKBRW-0001xB-Sv for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Aug 2021 05:25:10 +0200 Original-Received: from localhost ([::1]:52266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKBRU-00068q-Ps for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Aug 2021 23:25:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKBRO-00068i-Me for bug-gnu-emacs@gnu.org; Sat, 28 Aug 2021 23:25:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43706) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKBRO-0006p6-Fb for bug-gnu-emacs@gnu.org; Sat, 28 Aug 2021 23:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mKBRO-0001d5-Ae for bug-gnu-emacs@gnu.org; Sat, 28 Aug 2021 23:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sean Farley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Aug 2021 03:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47731 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 47731-submit@debbugs.gnu.org id=B47731.16302074816233 (code B ref 47731); Sun, 29 Aug 2021 03:25:02 +0000 Original-Received: (at 47731) by debbugs.gnu.org; 29 Aug 2021 03:24:41 +0000 Original-Received: from localhost ([127.0.0.1]:55252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKBR3-0001cT-GE for submit@debbugs.gnu.org; Sat, 28 Aug 2021 23:24:41 -0400 Original-Received: from mail.farley.io ([45.79.103.152]:58148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKBR1-0001cJ-73 for 47731@debbugs.gnu.org; Sat, 28 Aug 2021 23:24:40 -0400 Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 629B91B6521; Sat, 28 Aug 2021 20:24:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=farley.io; s=dkim; t=1630207477; h=from:subject:date:message-id:to:cc:mime-version:content-type: in-reply-to:references; bh=7VomOaTYAxUQauq+cYxurMvUm3RZtI/5w+xUKRMKmi8=; b=NtooQRGY2IR0Fj9FgumdX0ShVhLyjbGA1dIwMsjEu2y8vlhnPT/8i5mOCHrZyMB0Kvk74C HQ6VPXTSkOugF4iRUb5HEUrkKUoKfw5+OjnuXMC7f3GOOQQkbgbYCaHvntlTbLdheHOqVX 6X/ROQWhN/vd3vr70WuTHw4vd7lCqIs= In-reply-to: X-Last-TLS-Session-Version: TLSv1.3 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:212912 Archived-At: Alan Third writes: > 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. Is there anything I can do to help?