[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 5795051: Add ability to bring only the selected frame to the fron
From: |
Alan Third |
Subject: |
master 5795051: Add ability to bring only the selected frame to the front (bug#48865) |
Date: |
Sat, 12 Jun 2021 05:39:02 -0400 (EDT) |
branch: master
commit 57950515ecb3609bc252ecd0d33c802e04bbad64
Author: Matt Beshara <m@mfa.pw>
Commit: Alan Third <alan@idiocy.org>
Add ability to bring only the selected frame to the front (bug#48865)
Causes ‘ns-hide-emacs’ to layer the selected frame in front of every other
application’s windows, and give that frame keyboard focus, when called with
'activate-front.
* src/nsfns.m (Fns_hide_emacs): Allow activating only selected frame.
---
src/nsfns.m | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/nsfns.m b/src/nsfns.m
index 98801d8..454a6fd 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1953,8 +1953,11 @@ DEFUN ("ns-hide-emacs", Fns_hide_emacs, Sns_hide_emacs,
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 @@ the active application. */)
[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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 5795051: Add ability to bring only the selected frame to the front (bug#48865),
Alan Third <=