From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akib Azmain Turja Newsgroups: gmane.emacs.devel Subject: Implementing child frames on terminal Date: Tue, 12 Jul 2022 09:19:28 +0600 Message-ID: <87tu7n10hr.fsf@disroot.org> References: <87czfxu7be.fsf@disroot.org> <874k19tya1.fsf@disroot.org> <83h759lb6f.fsf@gnu.org> <87tu99s860.fsf@disroot.org> <838rqklurd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7957"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org, ibluefocus@outlook.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 12 05:21:49 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oB6T7-0001qu-42 for ged-emacs-devel@m.gmane-mx.org; Tue, 12 Jul 2022 05:21:49 +0200 Original-Received: from localhost ([::1]:43380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oB6T5-0004zL-Qf for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Jul 2022 23:21:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oB6S7-0004EW-7K for emacs-devel@gnu.org; Mon, 11 Jul 2022 23:20:47 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]:39004) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oB6S4-0001xR-To; Mon, 11 Jul 2022 23:20:46 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 975B340E48; Tue, 12 Jul 2022 05:20:42 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5nNx-nUjFv3U; Tue, 12 Jul 2022 05:20:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1657596041; bh=EgfxwN8Q/kfPMZYkR7jr+DOM8NN2JotvB47UkOhF0kw=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=G7Qq4Yz/63/W/LT2A1oAHkNUHchGlpQfL9F8D4I3OqrV1eKAzD/hACCPr4Z5UfGHA Y52OTCnNFtRklp0NtyMWDWLMaQ4ITCiFzOV1359LoYd7cqD/EMbxqiq9lCbRqwrA7T q4xeleqt/nCauaAZrn53XQuTCzpfFtHCvLTb0Q7ZCz7wMxvmO1H+1EtcxBX9gqwpla fdgHrJZDz4lO11csY4XwtkjZ3PMV4qihitFrZGePb2ePykcmytXwC2oaINOW+v2TY9 hB5+SO1GPIXWxoSlmm2rvSI2AxC61Pa1ej1FL4XROUcts2JUcWiwc0ZUcqgx29lAlh NQ0sUUZnnGIAg== In-Reply-To: <838rqklurd.fsf@gnu.org> Received-SPF: pass client-ip=178.21.23.139; envelope-from=akib@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:292065 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii 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] =2D-=20 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmLM6EEACgkQVTX89U2I YWtfig/+Pah1l2om67hH0xLJa/eGnu7OF0TVWc+DaJVSB5YSb5ObPevVWdvprlg5 wCm++zu10kwHEVaIKJQmYae0gUHmriHd07lg8UX8XeQctl3cR9vzFqxBeXgwsUPx zERg8f8BrM1EUxbCdLJMxa0VfOhWYKrQprAH32k9fDfreSt52odt9K6SpGJ64iMO fM2913hpajSwaTtiiryTm0EchtRw7/9EbzIN7/5sG1NB5QBC15gOsWI7uMdwyvn2 mwZFU/8Yi/cREfsz+RWfiLvjdn49LgIX6427ucGXR/AcwL1lx7IuQL/x1azjZeQD jOLx70FOyLHrm0nLrPT9lWYpme/q8YYWmR6vkrA7cZjpYmaPK5m0y8wI+iaw1Odo 6wNMh7u2yfkfwILLnqTpTRf8KRefewbf7peupZDrle9HUaGjDsLibdtlRXwS5uAo n/yhdjWmol/WIhzoCc6TRSHWAKm8hYOqKVekVeUkPBp/evhPbAXFhQSREPBhuPZi /OXWjMk06AMsNzmjS1xKtclDI/b7Iv+d/Ah0UVxA5FDYDl0jueGtVKzXh2fzfbeT FtiQGEKeLPwtz05f3Qc/rB1tl7rX1nn/mfg7P1uptV6ixr289QZ0fBJQIeeJ/bHK r92sl9Ec+hajb2X/NR1kmxO4Qs0pXLfda9YbVCtm+40S2hTiCA8= =JH8x -----END PGP SIGNATURE----- --=-=-=--