From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: Question about dubious code for terminal frames Date: Mon, 02 Sep 2024 17:46:43 +0200 Message-ID: References: <86wmju8em4.fsf@gnu.org> <86ed628aa3.fsf@gnu.org> <868qwa86nq.fsf@gnu.org> <867cbu842s.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27842"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org, rudalics@gmx.at To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 02 17:47:44 2024 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 1sl9HM-000721-22 for ged-emacs-devel@m.gmane-mx.org; Mon, 02 Sep 2024 17:47:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sl9GV-0004IJ-7d; Mon, 02 Sep 2024 11:46:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sl9GT-0004I8-HP for emacs-devel@gnu.org; Mon, 02 Sep 2024 11:46:49 -0400 Original-Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sl9GQ-0005J6-NT; Mon, 02 Sep 2024 11:46:48 -0400 Original-Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a8682bb5e79so542154366b.2; Mon, 02 Sep 2024 08:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725292005; x=1725896805; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VkrnO5hU6TXlv/eBEMHZ1OYgXEvdmJBCgqbxpR6L3Rw=; b=YR7h7tOXyicByeJUgo/FX3OdtZpqM6HRjnqDBkvccFov20hG1hVAyy/Zj38rRsz2zi 3/hPNr7b4a6DFvvcYkzAD9VoSxfubs56cFGu7h6fv/Xlvc+0VBxLqpek1Z4PqEFeqr73 oQKscIWz3oJ3w/D6WLXoZ4MKVGYnrYj+0rPK+bZVFAPDR8K4yjUuyc3WE36budTPzaH2 6HM5rnYfcpPZ+mcVUP5LELqdKee6lMnWI/+CZ19BACFLkbyNXlLcKnjqoXGUT82FO1xA ItSLBvLZNXZxXHpRAUZbeLI+apfvxJn0WiXUppiBOPKjukjJPMm9thnsCDx1WlOybtX6 UyyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725292005; x=1725896805; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=VkrnO5hU6TXlv/eBEMHZ1OYgXEvdmJBCgqbxpR6L3Rw=; b=Lryqqm2cVSiGd1SV8Hv5Vp+HvaH4yGOO6P5t1RipsdItKLjGusxUqkluy0EgjJ/btJ FVjPC+FzD3TYnTfbJ/6QDmuM2QFsFFZAIdoh2fGUOwn1BVS/fCyN4zzsH8gD7ht4zrvW eJJhujHt4DNV/IqpZzcqeVBuAk594mrTjBstC6ayq872DaRdqlPgmZy3bqTvgqlgrf8E SPeuQATF+Zr21WdOsx4bCkZeYuMDj87epP0SzjxqEV7JNytfHlhqslEVMrhed3gffQ8p sIOjUq/dp/ee35A4G0Ica4Ky3cp0E2NVwolIca8I7UIAzzhf7FlaCEXyupHCYy7ZK1jw pwpQ== X-Gm-Message-State: AOJu0Yy1zlX1UhED8f4Et3kKaMWjOtatfKIWzSubejc7U8asVKljJSJM 47fvJTkGvouVFdWgO6ZA2oS//GDzWyZJyebtPH6TN+7NhSHKHurP X-Google-Smtp-Source: AGHT+IHoa/9Gyr3g58VY6QiB6PkeLbjATCza1WThizWmV/n2zsHHp43kfVCJKOSAZHr+yWD/WS0pgg== X-Received: by 2002:a17:907:3685:b0:a80:f6a0:9c3c with SMTP id a640c23a62f3a-a89fab4f3d8mr328893366b.0.1725292004500; Mon, 02 Sep 2024 08:46:44 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a928.dip0.t-ipconnect.de. [79.227.169.40]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a898900f25fsm572020666b.75.2024.09.02.08.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2024 08:46:44 -0700 (PDT) In-Reply-To: <867cbu842s.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 02 Sep 2024 18:31:39 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x62a.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323296 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: emacs-devel@gnu.org, rudalics@gmx.at >> Date: Mon, 02 Sep 2024 16:54:31 +0200 >>=20 >> > But with the current proliferation of terminal emulators whose window >> > can be resized, what other choice do we have when the only source of >> > information about the resize is SIGWINCH? How else can we update the >> > Emacs notion of the frame's size? >>=20 >> See get_tty_size which the SIGWINCH handler already calls. We could use >> that to get the physical dimension of the terminal. > > Get the physical dimensions and then what? We must record the > dimensions in the frames and windows that share that terminal. Which > is what change_frame_size does. Set the terminal size And then do what we currently do to adapt the frame sizes. Only that the terminal size%1b[<35;19;43M now an input and not the result of frame size changes. > >> Outside of get_tty_size I'd make FrameCols/Rows const. I guess that >> frame size changes could remain as is. Only that setting FrameCols/Rows >> is none of their business. It's an input for them, not an output. > > Martin will correct me if I'm wrong, but I think the current code > already does what you want: it only changes FrameCols/Rows when the > terminal was really resized. It obviously does not. I mentioned what happens when making child frames in adjust_frame_size in my case. There is no SIGWINCH involved. Which makes me suspect that you are not taking adjust_frame_size into account?