unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Aaron Jensen <aaronjensen@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel@gnu.org
Subject: Re: macOS child frame lower behavior
Date: Thu, 28 May 2020 17:16:31 -0700	[thread overview]
Message-ID: <CAHyO48z73uQ0GF60kG6NuxCE=9jqfXX_i0CSjdXkmEnHFRSUBw@mail.gmail.com> (raw)
In-Reply-To: <4c0e3e63-5328-5447-ee02-762685092a5f@gmx.at>

On Thu, May 28, 2020 at 9:54 AM martin rudalics <rudalics@gmx.at> wrote:
>
>  > It apparently means the entire screen list on the desktop.
>
> Sounds bad (though I have no idea what "screen list" stands for).

Yeah, I just read it as list of windows, but who knows if that's
actually what it means.

>  > AFAICT, at least in Emacs, it does not do what is described. I created
>  > two child frames and attempted to restack them so that the second
>  > created one was above the first. This seemed to have no effect.
>
> I see.  The code works here as intended with a GNUStep build (under
> Debian's xfwm) so the problem is not on the Emacs side.  Does
> 'raise-frame' with two child frames work as intended?

No, it focuses the frame raised, but does not change its layering.

> What happens when
> you have two overlapping child frames and you click into the lower one?
> Does it raise to the top?

No, it does not.

> IIUC the following setup (which works here)
> would fail: Make two normal frames A and B with A overlapping B and on B
> make two child frames C and D where C overlaps D.  If you now in frame A
> evaluate (raise-frame D), does as a side-effect B overlap A?

Yes, whatever is done to a child actually impacts the parent.

> If we cannot fix that in some other way, we should probably make
> lowering a child frame a NOOP on MacOS when it is the sole child frame
> of its parent.  If there are two child frames, we could try to raise the
> other one, if that works somehow.  For more complicated situations, we'd
> have to look whether there exists a z-order for child frames and use
> that.

If you remove a child and re-add it, you can change the order, which
works for raise_frame, because when you add the child frame back it
gets added as the top-most. I don't know how to emulate a lower_frame
short of removing all of the children and then re-adding them in the
proper order (with the one being lowered first). Here's an example of
that working:

https://github.com/aaronjensen/child-frame-order-back-repro

Specifically: https://github.com/aaronjensen/child-frame-order-back-repro/blob/master/ChildWindowTest/ChildWindowController.m#L24-L47

Aaron



  reply	other threads:[~2020-05-29  0:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  1:34 macOS child frame lower behavior Aaron Jensen
2020-05-28  7:04 ` martin rudalics
2020-05-28 16:00   ` Aaron Jensen
2020-05-28 16:54     ` martin rudalics
2020-05-29  0:16       ` Aaron Jensen [this message]
2020-05-29  6:45         ` martin rudalics
2020-05-30 20:39           ` Aaron Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHyO48z73uQ0GF60kG6NuxCE=9jqfXX_i0CSjdXkmEnHFRSUBw@mail.gmail.com' \
    --to=aaronjensen@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).