GNU bug report logs - #48864
[PATCH] Allow ‘ns-hide-emacs’ to bring only the selected frame forward

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Matt Beshara <m@HIDDEN>; Keywords: patch; merged with #48865; Done: Alan Third <alan@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 28.1, send any further explanations to 48865 <at> debbugs.gnu.org and Matt Beshara <m@HIDDEN> Request was from Alan Third <alan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Forcibly Merged 48864 48865. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Jun 2021 08:42:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 06 04:42:23 2021
Received: from localhost ([127.0.0.1]:50585 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lpoMQ-0002Rc-Hs
	for submit <at> debbugs.gnu.org; Sun, 06 Jun 2021 04:42:23 -0400
Received: from lists.gnu.org ([209.51.188.17]:41250)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <m@HIDDEN>) id 1lplBv-0005p1-Ep
 for submit <at> debbugs.gnu.org; Sun, 06 Jun 2021 01:19:19 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37532)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <m@HIDDEN>) id 1lplBv-0002Vu-8h
 for bug-gnu-emacs@HIDDEN; Sun, 06 Jun 2021 01:19:19 -0400
Received: from wnew2-smtp.messagingengine.com ([64.147.123.27]:53487)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <m@HIDDEN>) id 1lplBt-0001BE-9W
 for bug-gnu-emacs@HIDDEN; Sun, 06 Jun 2021 01:19:19 -0400
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46])
 by mailnew.west.internal (Postfix) with ESMTP id 185B81B90
 for <bug-gnu-emacs@HIDDEN>; Sun,  6 Jun 2021 01:19:14 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute6.internal (MEProxy); Sun, 06 Jun 2021 01:19:14 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mfa.pw; h=from
 :to:subject:date:message-id:mime-version:content-type; s=fm2;
 bh=LiXbB5gluQRAmnFxJbd+cLTso1lCAMYmPydmj6TrTZg=; b=bbJDaYT84+47
 hi+dT0twOZWbQReEYFH0b6DpIGXXZOO/0DD0zp0MvTk/TS5wBMTDMh7CPWsYduaQ
 JSNHSWzWtxbNdFnUUChekO0TORzTxVTX1qpRcqPLpSHlSYj6aIMA33uJOQSZIhAy
 hhJke60SlCVME7dn5LxTvrwdOqWKmaw95N57x9GDwZ2a4/N4SJ8FOMrWdUfiky1s
 ObD8zic0RHkY/oAn9k3eW+myq0nYqMd2tvC5G/606FXEWd5c0NSln4FRT/iL05pc
 STm65Oy0eL+oLif4iBNC0j7xCjZez/tmJHV+bjQKh6QhFxDXNjqu0LrPPRotMpHX
 m0kbLKxe5g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:message-id
 :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm3; bh=LiXbB5gluQRAmnFxJbd+cLTso1lCA
 MYmPydmj6TrTZg=; b=DZVvctWZsaiB9qFkw5LzeJtjYxTR+hprKM1cHqGMF7M2U
 I9S6sF7GcSN/xMMiafTvbXWkdMdAY8OrId7ll/yXKaStReie7Vl5hfrLyufE4GRX
 DC8uF1vKg558Ed7gFU9sklr2t22gDcW87lyPeyB5BlTP1u+lXLZnzH+8Z0pAyazN
 G//wIlJYXGkyHeqr+CfvMrEHmXnQw0sNwAxrdln13jEXedfIjOOaKyuuDzfkZxcp
 655y2qK8Fj6hxE52GfmPyISYUaibSbk0rqQZH41AwXFj62HeFcVkWCvX09bOUorc
 gHNZ8EASE/iZAUWhizwj+4Hc971dQrOf7J7K8IO0Q==
X-ME-Sender: <xms:0Vq8YHGHllJ9ehZTbMUiRX8ruVoH__OZdYYfI3LVzhDMCiWPiRmV_w>
 <xme:0Vq8YEVN6Ym7OqScxBOvfD6YAVpOs19NfvCrYxAm2lw1B05lsc36T-rfEL84JRhNy
 ilR8qOFRIGBLngI0w>
X-ME-Received: <xmr:0Vq8YJI8vlyCf1lglkISjPb3zMsuvLxJu8c8GBg_edObWMPCsSJOdUjDIGljLGe9ql9cvvP21G-JSPNLJYDLw2ED61ODJQQIvi4>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedtgedgleehucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlfedtmdenogfthfevqddque
 grugeuohhunhgurghrhiffvggtlhgrrhgrthhiohhnucdlhedtmdenogeurgguqdfouhhl
 thhiphgrrhhtofhigigvugculdehuddmnecujfgurhepfgfhvffufffkgggtsehmtderre
 dtreejnecuhfhrohhmpeforghtthcuuegvshhhrghrrgcuoehmsehmfhgrrdhpfieqnecu
 ggftrfgrthhtvghrnhepvedvjedvleetieeggfegteelieduieeiueevheegueduleduje
 ehtefgteduveefnecuffhomhgrihhnpehmfhgrrdhpfienucevlhhushhtvghrufhiiigv
 pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmsehmfhgrrdhpfi
X-ME-Proxy: <xmx:0Vq8YFFi5h6x_u_xYvSDczno7YC8jqy6EYwpOvmPD1EculA8x8vwsA>
 <xmx:0Vq8YNVmXEGEiSRUAfTqf9bRsr0bUupAGzHqJtwvz3lZVqCbeNgTKg>
 <xmx:0Vq8YAPD_du0iY9IGSYmhuLfvGEqXCOBQDk9tIpLkmeZKRo3bs3WsA>
 <xmx:0Vq8YMADziO0SaQp08AIW461T87b7AszipvgUYcMeqdqKxAQmOChpE-B4fs>
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <bug-gnu-emacs@HIDDEN>; Sun, 6 Jun 2021 01:19:12 -0400 (EDT)
User-agent: mu4e 1.4.15; emacs 28.0.50
From: Matt Beshara <m@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Allow =?utf-8?Q?=E2=80=98ns-hide-emacs=E2=80=99?= to bring
 only the selected frame forward
Date: Sun, 06 Jun 2021 15:18:45 +1000
Message-ID: <m27dj7y3ii.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=64.147.123.27; envelope-from=m@HIDDEN;
 helo=wnew2-smtp.messagingengine.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 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, MIME_NO_TEXT=1,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -0.6 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 06 Jun 2021 04:42:21 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.6 (-)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

- --=-=-=
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Hi there,
I have attached a patch which adds a new capability to the=20
=E2=80=98ns-hide-emacs=E2=80=99 function in the NS port.  Specifically, it =
causes=20
the =E2=80=98ns-hide-emacs=E2=80=99 function to respond to being called wit=
h the=20
argument 'activate-front in a similar way to how it responds when=20
called with 'activate.  The difference is, instead of layering=20
every Emacs frame in front of every other application=E2=80=99s windows,=20
it only brings the selected frame forward.  I have uploaded a=20
small video of the new functionality in action here:=20
https://mfa.pw/activate-front.mp4

Please let me know if any modifications would need to be made to=20
this patch before it could be accepted.

Thanks for your time,
Matt


- --=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=activate-front.patch
Content-Transfer-Encoding: quoted-printable
Content-Description: activate-front.patch

From=20e595e37fa7ea503020e8acfe82324cff7751bf3d Mon Sep 17 00:00:00 2001
From: Matt Beshara <m@HIDDEN>
Date: Sun, 6 Jun 2021 13:06:47 +1000
Subject: [PATCH] =3D?UTF-8?q?Allow=3D20=3DE2=3D80=3D98ns-hide-emacs=3DE2=3D=
80=3D99=3D20to=3D20?=3D
 =3D?UTF-8?q?bring=3D20only=3D20the=3D20selected=3D20frame=3D20forward?=3D
MIME-Version: 1.0
Content-Type: text/plain; charset=3DUTF-8
Content-Transfer-Encoding: 8bit

=2D--
 src/nsfns.m | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/nsfns.m b/src/nsfns.m
index d14f7b51ea..f6ad1f7b9d 100644
=2D-- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1953,8 +1953,11 @@ Frames are listed from topmost (first) to bottommost=
 (last).  */)
        doc: /* If ON is non-nil, the entire Emacs application is hidden.
 Otherwise if Emacs is hidden, it is unhidden.
 If ON is equal to `activate', Emacs is unhidden and becomes
=2Dthe active application.  */)
=2D     (Lisp_Object on)
+the active application.
+If ON is equal to `activate-front', Emacs is unhidden and
+becomes the active application, but only the selected frame
+is layered in front of the windows of other applications.  */)
+  (Lisp_Object on)
 {
   check_window_system (NULL);
   if (EQ (on, intern ("activate")))
@@ -1962,6 +1965,12 @@ Frames are listed from topmost (first) to bottommost=
 (last).  */)
       [NSApp unhide: NSApp];
       [NSApp activateIgnoringOtherApps: YES];
     }
+  else if (EQ (on, intern ("activate-front")))
+    {
+      [NSApp unhide: NSApp];
+      [[NSRunningApplication currentApplication]
+        activateWithOptions: NSApplicationActivateIgnoringOtherApps];
+    }
   else if (NILP (on))
     [NSApp unhide: NSApp];
   else
=2D-=20
2.24.3 (Apple Git-128)


- --=-=-=--
-----BEGIN PGP SIGNATURE-----

iH8EARYKACcWIQQAspJWbe9M+a9rgYVIIu8JuyI3CgUCYLxazAkcbUBtZmEucHcA
CgkQSCLvCbsiNwoqRwEA+Vfc7X4ZrKGKiiNhBuMHXNH4B2kzvfbBnuidzCy9TE4A
/A++laL4yo7+yVsS2O+MOzDCFyevIYZsM9EYn0H15bkA
=5uBi
-----END PGP SIGNATURE-----




Acknowledgement sent to Matt Beshara <m@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#48864; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 12 Jun 2021 09:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.