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: Questions on glyph matrices used for rendering frame in terminal Date: Mon, 04 Jul 2022 23:26:18 +0600 Message-ID: <874jzwn611.fsf@disroot.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="999"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 04 19:27:35 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 1o8PrB-000Ady-V1 for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Jul 2022 19:27:33 +0200 Original-Received: from localhost ([::1]:50364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8PrA-0000MV-KF for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Jul 2022 13:27:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8PqE-00082w-KB for emacs-devel@gnu.org; Mon, 04 Jul 2022 13:26:35 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]:45658) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8PqC-0004qE-Ka for emacs-devel@gnu.org; Mon, 04 Jul 2022 13:26:34 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id A5EE540D8E for ; Mon, 4 Jul 2022 19:26:30 +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 7tfahVFJ-O5m for ; Mon, 4 Jul 2022 19:26:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1656955587; bh=p8soY7VyDYKFrCoow15zsE5CsgmWIPCO7ptmeYHcY/Q=; h=From:To:Subject:Date; b=Zc07gtYz2qETKEt22mkVAE+tsJRUq7N0Sgv0pRyXLKypZNvc5aRtcbfHAz+cPs3t2 9Rr1iFr8MoMzpcV/aLd7IyILrF5iNUINEH+IggzCKhPwMqS1KEN3nk2t6zIWu+aN11 B55MlhNP0CO2/R/6yLxxacn535c/81Yo6dQY/RGRM+35IfbH2WjSsKxP4a5c+m/EWQ wLF0AjNbK8neU/DErOm137kjUTJQN3BaqK18Nbm0vX0S0DbLIQOt69AiPIvAQfjFLP W8Nn4oxbvjpEQjTDLprTiQF1kA1jifcoQqno4YK2rMJEUBGHr0ci/QNwh1XGAe+CGk ybrebo4bNXlgw== 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:291833 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello hackers, I'm currently trying to understand how Emacs builds the desired matrix of a frame from the desired matrices of the windows in it. But I can barely understand anything. I would be grateful if someone familiar enough with it takes time to answer my following questions. 1. What's the purpose of the following in build_frame_matrix_from_leaf_window? "frame_row->used[TEXT_AREA]" will always end up being equal to "window_matrix->matrix_w" after processing the right-most window of the row. =2D-8<---------------cut here---------------start------------->8--- /* Set number of used glyphs in the frame matrix. Since we fill up with spaces, and visit leaf windows from left to right it can be done simply. */ frame_row->used[TEXT_AREA] =3D window_matrix->matrix_x + window_matrix->matrix_w; =2D-8<---------------cut here---------------end--------------->8--- 2. From the documentation of make-terminal-frame: > Note that changing the size of one terminal frame automatically > affects all frames on the same terminal device. But why? Do they share glyph matrices, since only one of them is visible at a single time? 3. Why clear the desired matrix in build_frame_matrix? As I understand, that would clear the glyph matrices of windows the frame, because window desired matrix shares memory with frame desired matrix, and its seems like build_frame_matrix is called after window desired matrices are built. =2D-8<---------------cut here---------------start------------->8--- /* Clear all rows in the frame matrix covered by window matrices. Menu bar lines are not covered by windows. */ for (i =3D FRAME_TOP_MARGIN (f); i < f->desired_matrix->nrows; ++i) clear_glyph_row (MATRIX_ROW (f->desired_matrix, i)); =2D-8<---------------cut here---------------end--------------->8--- 4. And one more question: why don't Emacs is use the window feature of ncurses despite depending on it? Is it inefficient or lack of any feature? Thanks in advance, and apologies if this is not the right place to ask. =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----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmLDIroACgkQVTX89U2I YWvJdBAAjCHTSgPWNbn6vn9vdHQaNlCIyyXtVWvlFM7BbnoH1cXQ13l1G/18eYno lYRL02Wqp7E279IPuZrk0+wb5uwsbVMBi6dMx8vSmEHw2oTi3gnpY9bucvfi6HeD 4IcUTrlAARrI+vc59neJtOk1malEL5fq5LsLuByAtG8I4YtkuJ67Bop4osjtdgVc WOfxn+OW2qSwqbEUmh+TZBgHtHRP8FMakejMS5eKbnDXc2UusuE2Kw8jvbF3o3dn DmF4ERIHsBjTCMAJwH/tnLn3uZ0RzA3opuSTjvNOOLU6V9urkjqrVNsjb6QD84jx 1/V556fxderuisJwQTgfxFCesubbn4s/LQWs+msE0UciOccmTnje8HQNdbDocY/9 MkkL2LaIxFcu8eaFZsxhdT/Y5xIsub3XsXO9P9MD6tBEYvHl8vsXrzoNNUPd1Oh6 PqP1ViLo6D+nbgQ/5mz6dkLMYutsD4wI4rbFV+iGxl1saZZSeKCmzIoqSutfPny7 GkkeZRVzeDM3jBZUkMp/uiteHoohpSBcNJu6ESZgBBvNV+vZU0bctqVlQJ5x8jbJ ryQ1VRHR/Lm6luvrJvM89R2WdOulcskXflgEM+T1lJ7y7n9zxiAzi9bURpWwmhfN vRwynaADJtryW+wa/CqpkAeKieR1cCZ3bs+84I7u/vQYxWbTnqU= =FH8x -----END PGP SIGNATURE----- --=-=-=--