unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org
Subject: Re: Q: child frames on ttys
Date: Fri, 30 Aug 2024 13:09:36 +0200	[thread overview]
Message-ID: <m2wmjy5ksv.fsf@pro2.fritz.box> (raw)
In-Reply-To: <cefc2d05-67d8-4f49-9be9-89092ca1a650@gmx.at> (martin rudalics's message of "Fri, 30 Aug 2024 11:17:12 +0200")

martin rudalics <rudalics@gmx.at> writes:

>> So, this seems to work, at least in principle. Where in principle means
>> I didn't try much yet, but it looks like I can at least display
>> overlapping child frames.
>
> The screenshot looks good.  The question is how much resources it takes
> to turn the visibility of child frames on and off.  I conjecture that
> restoring the original frame glyph matrix could/should be even cheaper
> than handling the corresponding expose events on graphic frames.

Hard to tell if it's cheaper than on GUIs, but my gut feeling is that it
won't be too expensive. But it remains to be seen, I'm not yet that far.

> I wonder whether you should invariably show truncation/continuation
> columns on child frames and give them a same background as line numbers,
> title bars and modelines to make the child frame stand out more against
> the overlapped frame.  At least optionally.

Yeah, that's also still open. I'd like if background-color and
foreground-color frame params did something reasonable, at least on
child frames.

And I think I'd also like to have optional frame borders,
with border-width or something. Something lile +-| with display table
entries for the edges, sides, and horizontal lines.

>> I have a question regarding the child frame feature in general though.
>>
>> As I said before, I want to use them for Corfu and Posframe, the latter
>> with Vertico and Transient. But the child frame feature looks like
>> something much more general, more like a general MDI feature, as opposed
>> to SDI. And my question is: Is that actually used somewhere? In some
>> package, or in Emacs itself? If it is, I'd be grateful for a pointer.
>
> Initially, I wrote the child frame code because I found the necessary
> APIs for Windows and X and planned to use them for tooltips.  Later I
> found out that they are not really useful for that purpose because on
> graphic displays tooltips are often displayed outside the parent frame
> while child frames are clipped.  Moreover, tooltips usually disappear
> when the user interacts in some way and the major advantage of child
> frames - namely that they move together with their parent - gets lost in
> practice.  I even spent some time on 'window-largest-empty-rectangle' to
> avoid that tooltips hide any normal text.  Currently, I'm still using
> normal frames for tooltips while I'm using child frames mostly for
> displaying the minibuffer.

Hm, okay. Thanks for the insight.

> Child frames can be used to overcome the classic restriction that Emacs
> windows are "tiled".  'display-buffer-in-child-frame' conceptually
> provides that feature.  But I don't see why that would need any special
> treatment on TTYs.  Why do you think that MDI vs SDI would impact the
> design of child frames on TTYs?

It wouldn't impact the design, I think. What I'm thinking of is
basically if I can get by supporting only what I really need for Corfu
and Posframe (+ Vertico + Transient), and nothing more, without
implementing the whole thing.

>> (Background is of course that I'm trying to assess how much work is
>> ahead, and if I want to do it :-).
>
> I suppose that visibility and restacking of child frames and size
> changes of child frames and their ancestors are the corner issues.

That's one thing. Another big one is the silent assumptioin that on ttys
there exists only one visible frame and that frame occupies the whole
terminal. Hard to find and pops up again and again. 

> Once these have been resolved, the code should be pushed and you
> should wait for user feedback.

It is already pushed, but to a branch in my fork :-).

Anyway, this can take a bit.



  parent reply	other threads:[~2024-08-30 11:09 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-17  7:24 Q: child frames on ttys Gerd Möllmann
2024-08-17 10:39 ` Eli Zaretskii
2024-08-17 11:02   ` Gerd Möllmann
2024-08-17 17:18   ` martin rudalics
2024-08-17 18:41     ` Gerd Möllmann
2024-08-21  7:10       ` Gerd Möllmann
2024-08-21  7:55         ` martin rudalics
2024-08-21  8:03           ` Gerd Möllmann
2024-08-21  8:11             ` Robert Pluim
2024-08-21  8:38               ` Gerd Möllmann
2024-08-21 12:00         ` Gerd Möllmann
2024-08-30  6:42           ` Gerd Möllmann
2024-08-30  9:17             ` martin rudalics
2024-08-30 11:03               ` Eli Zaretskii
2024-08-30 11:23                 ` Gerd Möllmann
2024-08-30 14:53                   ` Eli Zaretskii
2024-08-31  8:26                 ` Gerd Möllmann
2024-08-31 11:54                   ` Eli Zaretskii
2024-08-31 14:00                     ` Gerd Möllmann
2024-08-31 14:40                       ` Eli Zaretskii
2024-09-02  8:37                         ` Gerd Möllmann
2024-09-02 11:38                           ` Eli Zaretskii
2024-09-02 12:46                             ` Gerd Möllmann
2024-09-02 13:13                               ` Eli Zaretskii
2024-09-02 13:54                                 ` Gerd Möllmann
2024-08-30 11:09               ` Gerd Möllmann [this message]
2024-08-30  9:29             ` Robert Pluim
2024-08-30 11:19               ` Gerd Möllmann
2024-08-30 12:00                 ` Robert Pluim
2024-08-30 12:37                   ` Gerd Möllmann
2024-08-30 21:11 ` Dmitry Gutov
2024-08-31  6:45   ` Eli Zaretskii
2024-08-31  8:46     ` Po Lu
2024-09-01  0:27       ` Dmitry Gutov
2024-09-16  1:35         ` Dmitry Gutov
2024-09-01  0:27     ` Dmitry Gutov

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=m2wmjy5ksv.fsf@pro2.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --cc=eliz@gnu.org \
    --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).