emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Implementing child frames on terminal


From: Akib Azmain Turja
Subject: Implementing child frames on terminal
Date: Tue, 12 Jul 2022 09:19:28 +0600

Eli Zaretskii <eliz@gnu.org> writes:

> I suggested to treat child frames on TTY as
> special kinds of windows: if we do that, we "just" need to support
> windows whose glyph matrix partially overlaps those of the other
> windows, and make sure we update the glyph matrices of the child
> frame's windows _after_ we are done with all the windows of the parent
> frame.  This way, the frame glyph matrix that is eventually used to
> update what's on the glass will correctly reflect what should be on
> the screen.

Your idea is good, but until the child frame crosses the edges of it's
parent.  Then it'll cause a segmentation fault (the best case) or
continue without any symptom and corrupt your files or something else
silently (the worst case).

I think we should somehow render the child frame glyph matrix before
processing it's parents.  Then we can copy the it's glyph matrix to it's
parent's one.  And, in case the child frame doesn't cross parent's
edges, we can use a floating window (as you suggested) as an
optimization (although I don't think we need this optimization, since
terminal don't usually have many characters).

And the final question, what should we do when the child frame crosses
it's parent's edges, but doesn't cross the display?  Should we clip it
(like most window systems) [1] or not (like NS) [2]?

  +----------------------+        +----------------------+
  |frame 1               |        |frame 1               |
  |parent nil            |        |parent nil            |
  |  +-------------+     |        |  +-------------+     |
  |  |frame 2      |     |        |  |frame 2      |     |
  |  |parent 1     |     |        |  |parent 1     |     |
  |  | +-----------|     |        |  | +--------------+  |
  |  | |frame 3    |     |        |  | |frame 3       |  |
  |  | |parent 2   |     |        |  | |parent 2      |  |
  |  | +-----------|     |        |  | +--------------+  |
  |  +-------------+     |        |  +-------------+     |
  +----------------------+        +----------------------+

            [1]                             [2]

-- 
Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]