* delete-frame raises other frames
@ 2016-10-14 18:36 Matt McClure
2016-10-14 19:08 ` Eli Zaretskii
2016-10-14 19:40 ` Yuri Khan
0 siblings, 2 replies; 8+ messages in thread
From: Matt McClure @ 2016-10-14 18:36 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
When I do C-x 5 0 or M-x delete-frame, my Emacs raises one of its other
frames. I'd prefer that no Emacs frame would raise and that my Mac would
show whatever windows were previously under the just deleted frame.
I made a 20-second screen cast[1] that shows the problem.
1. I start with a Terminal window.
2. I start Emacs with `emacs -Q`.
3. I create a second frame with C-x 5 0.
4. I stack the three windows from top to bottom:
1. Second Emacs frame
2. Terminal window
3. First Emacs frame
5. I delete the second Emacs frame using C-x 5 0
6. I observe that the first Emacs frame raises over the Terminal window.
How can I make the first Emacs frame stay under the Terminal window when
closing the second Emacs frame?
PS. I reported a similar issue[2] using emacsclient. Maybe they have the
same cause.
[1]:
https://drive.google.com/file/d/0B59oD6VJewIZei1PQ3JSUzhCQjA/view?usp=sharing
[2]: https://lists.gnu.org/archive/html/help-gnu-emacs/2016-09/msg00126.html
--
http://matthewlmcclure.com
+1 617 329 1189
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: delete-frame raises other frames
2016-10-14 18:36 delete-frame raises other frames Matt McClure
@ 2016-10-14 19:08 ` Eli Zaretskii
2016-10-14 23:01 ` Matt McClure
2016-10-14 19:40 ` Yuri Khan
1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2016-10-14 19:08 UTC (permalink / raw)
To: help-gnu-emacs
> From: Matt McClure <matt@matthewlmcclure.com>
> Date: Fri, 14 Oct 2016 14:36:20 -0400
>
> 1. I start with a Terminal window.
> 2. I start Emacs with `emacs -Q`.
> 3. I create a second frame with C-x 5 0.
> 4. I stack the three windows from top to bottom:
> 1. Second Emacs frame
> 2. Terminal window
> 3. First Emacs frame
> 5. I delete the second Emacs frame using C-x 5 0
> 6. I observe that the first Emacs frame raises over the Terminal window.
>
> How can I make the first Emacs frame stay under the Terminal window when
> closing the second Emacs frame?
Is auto-raise-mode enabled or disabled in your sessions? If it's
enabled, try disabling it.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: delete-frame raises other frames
2016-10-14 18:36 delete-frame raises other frames Matt McClure
2016-10-14 19:08 ` Eli Zaretskii
@ 2016-10-14 19:40 ` Yuri Khan
2016-10-14 23:02 ` Matt McClure
1 sibling, 1 reply; 8+ messages in thread
From: Yuri Khan @ 2016-10-14 19:40 UTC (permalink / raw)
To: Matt McClure; +Cc: help-gnu-emacs@gnu.org
On Sat, Oct 15, 2016 at 1:36 AM, Matt McClure <matt@matthewlmcclure.com> wrote:
> When I do C-x 5 0 or M-x delete-frame, my Emacs raises one of its other
> frames. I'd prefer that no Emacs frame would raise and that my Mac would
> show whatever windows were previously under the just deleted frame.
Does Mac not have a system-wide window manager key to close windows,
like Alt+F4 on Windows and most X11 window managers?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: delete-frame raises other frames
2016-10-14 19:08 ` Eli Zaretskii
@ 2016-10-14 23:01 ` Matt McClure
2016-10-18 13:30 ` Matt McClure
0 siblings, 1 reply; 8+ messages in thread
From: Matt McClure @ 2016-10-14 23:01 UTC (permalink / raw)
To: help-gnu-emacs
Seems disabled.
(frame-parameter nil 'auto-raise)
nil
On Fri, Oct 14, 2016 at 3:08 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Matt McClure <matt@matthewlmcclure.com>
> > Date: Fri, 14 Oct 2016 14:36:20 -0400
> >
> > 1. I start with a Terminal window.
> > 2. I start Emacs with `emacs -Q`.
> > 3. I create a second frame with C-x 5 0.
> > 4. I stack the three windows from top to bottom:
> > 1. Second Emacs frame
> > 2. Terminal window
> > 3. First Emacs frame
> > 5. I delete the second Emacs frame using C-x 5 0
> > 6. I observe that the first Emacs frame raises over the Terminal
> window.
> >
> > How can I make the first Emacs frame stay under the Terminal window when
> > closing the second Emacs frame?
>
> Is auto-raise-mode enabled or disabled in your sessions? If it's
> enabled, try disabling it.
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: delete-frame raises other frames
2016-10-14 19:40 ` Yuri Khan
@ 2016-10-14 23:02 ` Matt McClure
0 siblings, 0 replies; 8+ messages in thread
From: Matt McClure @ 2016-10-14 23:02 UTC (permalink / raw)
To: help-gnu-emacs@gnu.org
I can create and close Emacs frames using Cmd+N and Cmd+W respectively. The
resulting window stacking order is the same as when I use C-x 5 2 and C-x 5
0.
On Fri, Oct 14, 2016 at 3:40 PM, Yuri Khan <yuri.v.khan@gmail.com> wrote:
> On Sat, Oct 15, 2016 at 1:36 AM, Matt McClure <matt@matthewlmcclure.com>
> wrote:
>
> > When I do C-x 5 0 or M-x delete-frame, my Emacs raises one of its other
> > frames. I'd prefer that no Emacs frame would raise and that my Mac would
> > show whatever windows were previously under the just deleted frame.
>
> Does Mac not have a system-wide window manager key to close windows,
> like Alt+F4 on Windows and most X11 window managers?
>
--
http://matthewlmcclure.com
+1 617 329 1189
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: delete-frame raises other frames
2016-10-14 23:01 ` Matt McClure
@ 2016-10-18 13:30 ` Matt McClure
2016-10-18 14:50 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Matt McClure @ 2016-10-18 13:30 UTC (permalink / raw)
To: Matt McClure, help-gnu-emacs
On Fri, Oct 14, 2016 at 7:01 PM Matt McClure <matthewlmcclure@gmail.com>
wrote:
> On Fri, Oct 14, 2016 at 3:08 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Matt McClure <matt@matthewlmcclure.com>
> > Date: Fri, 14 Oct 2016 14:36:20 -0400
> >
> > 1. I start with a Terminal window.
> > 2. I start Emacs with `emacs -Q`.
> > 3. I create a second frame with C-x 5 0.
> > 4. I stack the three windows from top to bottom:
> > 1. Second Emacs frame
> > 2. Terminal window
> > 3. First Emacs frame
> > 5. I delete the second Emacs frame using C-x 5 0
> > 6. I observe that the first Emacs frame raises over the Terminal
> window.
> >
> > How can I make the first Emacs frame stay under the Terminal window when
> > closing the second Emacs frame?
>
> Is auto-raise-mode enabled or disabled in your sessions? If it's
> enabled, try disabling it.
>
> Seems disabled.
>
> (frame-parameter nil 'auto-raise)
> nil
>
Any ideas where I should look next? I'm happy to look at the implementation
if there's no user-configurable solution.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: delete-frame raises other frames
2016-10-18 13:30 ` Matt McClure
@ 2016-10-18 14:50 ` Eli Zaretskii
2016-10-22 16:38 ` Matt McClure
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2016-10-18 14:50 UTC (permalink / raw)
To: help-gnu-emacs
> From: Matt McClure <matthewlmcclure@gmail.com>
> Date: Tue, 18 Oct 2016 13:30:40 +0000
>
> > Is auto-raise-mode enabled or disabled in your sessions? If it's
> > enabled, try disabling it.
> >
> > Seems disabled.
> >
> > (frame-parameter nil 'auto-raise)
> > nil
> >
>
> Any ideas where I should look next? I'm happy to look at the implementation
> if there's no user-configurable solution.
Well, this doesn't happen to me, and from lack of other "me too"
responses, I'm guessing that this is either specific to OS X or even
to your system's configuration.
I know nothing about GUI on OS X, so I cannot help you where to look
for the cause. Hopefully, someone else will.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: delete-frame raises other frames
2016-10-18 14:50 ` Eli Zaretskii
@ 2016-10-22 16:38 ` Matt McClure
0 siblings, 0 replies; 8+ messages in thread
From: Matt McClure @ 2016-10-22 16:38 UTC (permalink / raw)
To: help-gnu-emacs
On Tue, Oct 18, 2016 at 10:50 AM Eli Zaretskii <eliz@gnu.org> wrote:
> Well, this doesn't happen to me, and from lack of other "me too"
> responses, I'm guessing that this is either specific to OS X or even
> to your system's configuration.
>
Thanks, Eli.
My guess is that it's specific to OS X.
I looked at the Emacs source code a bit. I found the following in
delete_frame[1]:
```
#ifdef NS_IMPL_COCOA
else
/* Under NS, there is no system mechanism for choosing a new
window to get focus -- it is left to application code.
So the portion of THIS application interfacing with NS
needs to know about it. We call Fraise_frame, but the
purpose is really to transfer focus. */
Fraise_frame (frame1);
#endif
```
The following might also be relevant:
- Apple's window concepts documentation[2]
- Uses of NSApp[3], e.g.,
- activateIgnoringOtherApps[4]
- makeKeyAndOrderFront[5]
[1]:
https://github.com/emacs-mirror/emacs/blob/d4a32c4d5955ac04c5017a43042d873e42b3ebec/src/frame.c#L1639
[2]:
https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html
[3]: https://github.com/emacs-mirror/emacs/search?utf8=%E2%9C%93&q=nsapp
[4]:
https://github.com/emacs-mirror/emacs/search?utf8=%E2%9C%93&q=activateIgnoringOtherApps&type=Code
[5]:
https://github.com/emacs-mirror/emacs/search?utf8=%E2%9C%93&q=makeKeyAndOrderFront&type=Code
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-10-22 16:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-14 18:36 delete-frame raises other frames Matt McClure
2016-10-14 19:08 ` Eli Zaretskii
2016-10-14 23:01 ` Matt McClure
2016-10-18 13:30 ` Matt McClure
2016-10-18 14:50 ` Eli Zaretskii
2016-10-22 16:38 ` Matt McClure
2016-10-14 19:40 ` Yuri Khan
2016-10-14 23:02 ` Matt McClure
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).