From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Kai Ma Newsgroups: gmane.emacs.bugs Subject: bug#61525: 29.0.60; delete-frame will raise frames in another virtual desktop Date: Thu, 16 Feb 2023 00:49:41 +0900 Message-ID: <67519603-3933-4CCB-8118-F6304D356D2D@gmail.com> References: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11336"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61525@debbugs.gnu.org To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 15 16:51:09 2023 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 1pSK3o-0002pf-TM for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Feb 2023 16:51:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSK3j-0005Om-Tz; Wed, 15 Feb 2023 10:51:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSK3i-0005OP-Ku for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 10:51:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSK3i-000061-BC for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 10:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSK3i-0008Mq-78 for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 10:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Kai Ma Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Feb 2023 15:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61525 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: 61525@debbugs.gnu.org, "Daniel =?UTF-8?Q?Mart=C3=ADn?= via Bug reports for GNU Emacs, the Swiss army knife of text editors" Original-Received: via spool by submit@debbugs.gnu.org id=B.167647620432063 (code B ref -1); Wed, 15 Feb 2023 15:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Feb 2023 15:50:04 +0000 Original-Received: from localhost ([127.0.0.1]:33683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSK2l-0008L5-Ev for submit@debbugs.gnu.org; Wed, 15 Feb 2023 10:50:03 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:36772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSK2j-0008KW-8e for submit@debbugs.gnu.org; Wed, 15 Feb 2023 10:50:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSK2i-0005Dl-1U for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 10:50:00 -0500 Original-Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSK2g-000830-Bg for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 10:49:59 -0500 Original-Received: by mail-pg1-x542.google.com with SMTP id a23so12826567pga.13 for ; Wed, 15 Feb 2023 07:49:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UZESHUey2zKd7M7e4rLXE+X8zq52al/8reB78xfv9Zw=; b=AH/MQmVkg+dnDJMkDvP7uMuZ8K6EkDRNR4cm8aeoa2JIZmm8RqdBaZzSVzyfDnUAkA OA/qYAGCqU+favHNs8lhEnt469Vcj0xNPvVc5tU5u8kUfSo35dmDzd2XMDDcAKS3lZJx pkeEJF3DVlKtwz87LHasNjv8vKkbu6lEMm6XbLlAeEKohnCqPkIgxlEMuPD6IxepLBR+ BaBHrH2PM4r7rFAp+/LvAKu+3nhIgWwzolLuSF7lDKbDOB2fNFfQN7b+t8gl3IcSga69 RfNMAHVuympI5oT7JYvDigf1v61vE/6huIv2Cq+qeQUd3tTwS9njAWiI0N1nmlWhv6ut S0oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UZESHUey2zKd7M7e4rLXE+X8zq52al/8reB78xfv9Zw=; b=5Ny8TjrUP6ovmIyoXZVfxEV9wFvCK1bk8h36QQowqE0dKs/rsWj3XSY1AyP8ZOG1IA MBgGc+xj2yii++CwZVXQaUBH+60/ycZxyq1tV5qoXedHvYN5U6XqaqA6NMWsSZUO4Yfx mW4QhmX/YvD/5CK/uXP3QRb/8DRBcxh1BVcvxFDxPjyuGVbPHCJvmwjykb/gJii/7Ujy +4K036+yHbqdfEXjMujkyZGaMriRNyhp6YaO5DsEWf8VEoZ8/PmMXzaXdW9URQxK4hhg WECJJuxIQ983tlIoGwjG1DhS0tJZnK3TvZVA0sdbRr1PP6NoCNwVdA1oZYVR49qPwtWA mY/Q== X-Gm-Message-State: AO0yUKUVX3ljwvayZULAYKQA5ndLti7HsAsCC3uPIVtLpr13tFIKaysW 3/WoG3ig5q6Znu2lrGwgggQ= X-Google-Smtp-Source: AK7set/royCubIekQnIANkXO/gtTCo4GYV/RcMZDc+lzz7/qdK+1Mg6cRo4XyKZ20QyvN52BTiEJvg== X-Received: by 2002:a62:190a:0:b0:5a8:46b0:826f with SMTP id 10-20020a62190a000000b005a846b0826fmr2093909pfz.22.1676476196268; Wed, 15 Feb 2023 07:49:56 -0800 (PST) Original-Received: from smtpclient.apple ([2404:c800:922f:c43:a8cb:bbff:fe7b:8380]) by smtp.gmail.com with ESMTPSA id c19-20020aa781d3000000b0058bc7453285sm11859541pfn.217.2023.02.15.07.49.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Feb 2023 07:49:55 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3731.300.101.1.3) Received-SPF: pass client-ip=2607:f8b0:4864:20::542; envelope-from=justksqsf@gmail.com; helo=mail-pg1-x542.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FROM_LOCAL_NOVOWEL=0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255737 Archived-At: > On Feb 16, 2023, at 00:41, Daniel Mart=C3=ADn = wrote: >=20 > Daniel Mart=C3=ADn via "Bug reports for GNU Emacs, the Swiss army = knife of > text editors" writes: >=20 >>=20 >> One downside of removing raise_frame is that, after you press C-x 5 = 0, >> you cannot start typing right away without first focusing on another >> Emacs frame manually. People would consider this a regression from >> previous versions and something that doesn't happen on GNU/Linux. >>=20 >> A possibly better approach could be: >>=20 >> Once the "other" frame to select is chosen by the code that is just >> above in frame.c, call some Obj-C code that extracts the EmacsView = and >> makes it the first responder: >>=20 >> EmacsView *view =3D FRAME_NS_VIEW (frame1); >> [self makeFirstResponder:view]; >>=20 >> I haven't tested this, but perhaps this makes the other frame receive >> focus without switching desktops in a multi-desktop configuration. >=20 > The attached patch avoids the unwanted side effects of raise-frame by > making the other frame the key window, instead. Could you give it a > try? >=20 > <0001-NS-Do-not-raise-a-different-frame-when-closing-a-fra.patch> Thanks for the very fast fix! I can confirm it works for me on macOS = 13.1.