From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61525: 29.0.60; delete-frame will raise frames in another virtual desktop Date: Thu, 16 Feb 2023 09:36:46 +0800 Message-ID: <871qmqs85t.fsf@yahoo.com> References: <835yc2c0vw.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 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="39519"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 61525@debbugs.gnu.org, justksqsf@gmail.com, Daniel =?UTF-8?Q?Mart=C3=ADn?= To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 16 02:40:27 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 1pSTG6-000A5e-R5 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Feb 2023 02:40:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSTFk-0008II-2V; Wed, 15 Feb 2023 20:40:04 -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 1pSTFi-0008I0-4W for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 20:40: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 1pSTFh-0000sS-QV for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 20:40:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSTFh-00073N-Mg for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 20:40:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Feb 2023 01:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61525 X-GNU-PR-Package: emacs Original-Received: via spool by 61525-submit@debbugs.gnu.org id=B61525.167651155927047 (code B ref 61525); Thu, 16 Feb 2023 01:40:01 +0000 Original-Received: (at 61525) by debbugs.gnu.org; 16 Feb 2023 01:39:19 +0000 Original-Received: from localhost ([127.0.0.1]:34528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSTF0-00072A-KV for submit@debbugs.gnu.org; Wed, 15 Feb 2023 20:39:18 -0500 Original-Received: from sonic311-52.consmr.mail.ne1.yahoo.com ([66.163.188.233]:42422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSTEu-00071s-WA for 61525@debbugs.gnu.org; Wed, 15 Feb 2023 20:39:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1676511546; bh=J7y3DXSpwMVUJpnQMwtT+kQZZ1zv8bo+g14DwxFwWvg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=m7rwrsMZFvpbpMssJR7QnFeaVcfnsGGKcn7coE3xa4cvU0yJ9UFS57RXPS/1AesADkkeRZFFtV0m0QODfDS7NtHSzmfeRuJZQHSNsvxeYOFcU4FwiEprcDeppphyr/5A1Z4Radj4TwG7ibkUiMuSWW4gCFBNnsy40Ly7ig6O62Ly3uLb4fMLiJlVw/+5/NjxvDtJXOLtkEBUCzLeOxGDr8QL07p61A8TzHpTZxAu7TJqg7zpCDDtb8Antp8dcSfBjDrzjIF1Me/MdAEioE81W9kjP0f+4EkzijW4U9m5rctgcRuGEyogjn/q0qotRhYYRIsSeNNxmFdCTCB2naiB+g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1676511546; bh=0u0L9AJdRivBIabnl5NYlCeucL7tUsAzQUjfA/0bWn7=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=XIcrn7k+N5e2+7lOOwprx9guimx5lodZl+yynkuxqk7VdpPgr8HNICe+M8GBl/T0G4oN9wqHVqd5akch7EKTo40o4cm/j3nIqtz0LftSfKgHWeRROqwzVHDjhr0FyRSXSzR2e4uJ/ROwnsHPelLfNKPiwA42FtBTuWIjFLutQUhKnn4Tb9tSqfIEuwwJiJBmauplXb0982sZ8YHaWo5TywBxcChfY/cHy7REn3RYtTcV+x6uLNNGJvNqIUmnFQ3yT3rnxI4LtX+8oTGLg9Zc1pGfJcb3qo+QL1UQTb91VpXijdcxpaZkmdcFSpP5gM/53038kBkzhmH63OzxjX/xTQ== X-YMail-OSG: TnHxDPUVM1naaIylZlbdmjdy6zBUA19UXX7JMW65QkfWTd0imqCH0vw8SPAY34h sqpVUMYediddGDRu1PugDz0d_oTIuAhKEpdMVSaVvSVLLk01U0Ya2P4WgZFP7ksnRyyA8N.LMyme rMutZimtLeXGGViT07CHa7gtGfl..b6JPgRC1frx_NyW4RCANkGka3D_QnsV22kP5qVK.fuZUIIk YLyH1WXdndGIxzsBQ5_qrINqkL3l4DsvtK3U5bDzikQampUOH3O0LrqXQeLbdyGUsj3ZEDAfH8zY iFTVJZWEC8EGldVni7fHhAx0YXI8U7hLTgvZnWP6Tx7NJ_bW.GWu60iUk5x2ukWtWB4X.XFtdBsw jPZMnqR.MQm7lxJZTX1kJrTP7OqoN4VLtwHXreRnOmnrfypcAOPV4x1gRsZxjHoFEry_D9SKX4Lp 3mmqUQhT1OEEP.z5.Dg3rHR_Cb5mlrllqgMimFz.Khmwu1dKm9tiSzqgL2qGEw1uj1u69bjwIq4L LTHR0QBhqKgXGWhI03JSAwHIBR7ppo5gn7Qy17pICa_wLRoAwFfgGYVAWiNXKOjjD9GNBn8F4oLl NEQWIi5DMMbrS8Fy311iafP4G7Zkzz63kZpXujivgv3xT.xb2tt0Pczx.4p.RmVMhzhZ3QYdxWJS pA7eSy6AmK16NAlbUYSSS4X_WYOHG1moyjoP5fY6exN09Q7kz7VAlZUbl5pA1ChAl4sdFYUEkhgR DfyEq115KlDOGIYtovb.fuwb2D0t17lMuIAN5.Igz6S4_9nBhWoRw3IeP4bdk8H4dvS3HNYBg3Bh fka.oSoa2pk7t0JsLpWiMxeZBp33zAR_WTIO.NteJW X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Thu, 16 Feb 2023 01:39:06 +0000 Original-Received: by hermes--production-sg3-9fc5746c8-pz6sb (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID ea1343912508f178e916992d8e4b5638; Thu, 16 Feb 2023 01:37:03 +0000 (UTC) In-Reply-To: <835yc2c0vw.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 15 Feb 2023 19:08:19 +0200") X-Mailer: WebService/1.1.21183 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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:255786 Archived-At: Eli Zaretskii writes: >> Cc: justksqsf@gmail.com >> Date: Wed, 15 Feb 2023 16:41:41 +0100 >> From: Daniel Mart=C3=ADn via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >>=20 >> Daniel Mart=C3=ADn via "Bug reports for GNU Emacs, the Swiss army knife = of >> text editors" writes: >>=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. >> > >> > A possibly better approach could be: >> > >> > 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: >> > >> > EmacsView *view =3D FRAME_NS_VIEW (frame1); >> > [self makeFirstResponder:view]; >> > >> > 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? > > Thanks. > >> +void ns_make_frame_key_window (struct frame *f) >> +{ >> + [[FRAME_NS_VIEW (f) window] makeKeyWindow]; >> +} justksqsf@gmail.com, please write: void ns_make_frame_key_window (struct frame *f) { ... } instead. > Is this new call guaranteed to exist and work well on all the > supported OS versions where we have the NS build? I wouldn't want to > fix this on some systems and break it on others at the same time. Yes, this seems to exist in GNUstep (meaning that it should exist in an old Mac OS as well.)