From e595e37fa7ea503020e8acfe82324cff7751bf3d Mon Sep 17 00:00:00 2001 From: Matt Beshara Date: Sun, 6 Jun 2021 13:06:47 +1000 Subject: [PATCH] =?UTF-8?q?Allow=20=E2=80=98ns-hide-emacs=E2=80=99=20to=20?= =?UTF-8?q?bring=20only=20the=20selected=20frame=20forward?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 --- 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 -the active application. */) - (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 -- 2.24.3 (Apple Git-128)