all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Akib Azmain Turja <akib@disroot.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org, ibluefocus@outlook.com
Subject: Implementing child frames on terminal
Date: Tue, 12 Jul 2022 09:19:28 +0600	[thread overview]
Message-ID: <87tu7n10hr.fsf@disroot.org> (raw)
In-Reply-To: <838rqklurd.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2290 bytes --]


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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2022-07-12  3:19 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-28 13:15 [NonGNU ELPA] New packages: corfu-doc and corfu-doc-terminal Akib Azmain Turja
2022-05-28 13:55 ` Philip Kaludercic
2022-05-28 14:38 ` Stefan Monnier
2022-05-28 16:30   ` Akib Azmain Turja
2022-05-28 17:47     ` Stefan Monnier
2022-05-28 20:27       ` Akib Azmain Turja
2022-05-28 22:03         ` Stefan Monnier
2022-05-28 19:16     ` Eli Zaretskii
2022-05-28 20:40       ` Akib Azmain Turja
2022-05-29  6:26         ` Eli Zaretskii
2022-07-12  3:19           ` Akib Azmain Turja [this message]
2022-07-12  5:13             ` Implementing child frames on terminal Po Lu
2022-07-12  8:35               ` Akib Azmain Turja
2022-07-12  9:44                 ` Po Lu
2022-07-12 13:25                   ` Eli Zaretskii
2022-07-12 13:38                     ` Po Lu
2022-07-12 13:48                       ` Eli Zaretskii
2022-07-12 13:19                 ` Eli Zaretskii
2022-07-12 14:21                   ` Akib Azmain Turja
2022-07-12 15:46                     ` Eli Zaretskii
2022-07-13 14:33                       ` Akib Azmain Turja
2022-07-13 15:57                         ` Eli Zaretskii
2022-07-13 17:55                           ` Akib Azmain Turja
2022-07-13 18:11                             ` Eli Zaretskii
2022-07-14  7:14                               ` Akib Azmain Turja
2022-07-14  7:27                                 ` Eli Zaretskii
2022-07-12 13:06             ` Eli Zaretskii
2022-07-12 13:40               ` Po Lu
2022-07-12 13:50                 ` Eli Zaretskii
2022-07-12 13:54                   ` Po Lu
2022-07-12 14:17                     ` Eli Zaretskii
2022-07-14  1:27                       ` Po Lu
2022-07-14  1:55                       ` Stefan Monnier
2022-07-14  3:34                         ` Po Lu
2022-07-14 14:00                           ` Stefan Monnier
2022-07-14  5:56                         ` Eli Zaretskii
2022-07-14  6:29                           ` Po Lu
2022-07-14  6:53                           ` Akib Azmain Turja
2022-07-14  7:20                             ` Eli Zaretskii
2022-07-14 12:07                               ` Akib Azmain Turja
2022-07-14 13:12                                 ` Eli Zaretskii
2022-07-14 13:52                                   ` Akib Azmain Turja
2022-07-14 14:00                                     ` Eli Zaretskii
2022-07-15  2:37                                     ` Po Lu
2022-07-15  3:35                                       ` Stefan Monnier
2022-07-15  4:24                                         ` Po Lu
2022-07-15  5:07                                           ` tomas
2022-07-14  7:25                             ` Po Lu
2022-07-14 12:11                               ` Akib Azmain Turja
2022-07-14 19:33                               ` Tassilo Horn
2022-07-14 14:03                           ` Stefan Monnier
2022-07-15 10:28                             ` Akib Azmain Turja
2022-07-12 14:03                 ` Akib Azmain Turja
2022-05-28 15:02 ` [NonGNU ELPA] New packages: corfu-doc and corfu-doc-terminal Stefan Monnier
2022-05-28 16:06 ` Akib Azmain Turja
2022-05-28 17:46   ` Philip Kaludercic
2022-05-28 20:31     ` Akib Azmain Turja
2022-05-29  8:14       ` Daniel Mendler
2022-07-15 15:06         ` Akib Azmain Turja
2022-07-17 14:53           ` Philip Kaludercic
2022-07-17 17:06             ` Akib Azmain Turja
2022-07-17 18:27               ` Philip Kaludercic
2022-07-18  9:27                 ` Akib Azmain Turja
2022-07-17 19:08               ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=87tu7n10hr.fsf@disroot.org \
    --to=akib@disroot.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=ibluefocus@outlook.com \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.