From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Question about dubious code for terminal frames Date: Mon, 02 Sep 2024 18:31:39 +0300 Message-ID: <867cbu842s.fsf@gnu.org> References: <86wmju8em4.fsf@gnu.org> <86ed628aa3.fsf@gnu.org> <868qwa86nq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9223"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, rudalics@gmx.at To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 02 17:32:46 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 1sl92s-0002FJ-Hb for ged-emacs-devel@m.gmane-mx.org; Mon, 02 Sep 2024 17:32:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sl92B-0001cR-DV; Mon, 02 Sep 2024 11:32:03 -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 1sl91s-0001YV-JC for emacs-devel@gnu.org; Mon, 02 Sep 2024 11:31:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sl91s-0003bZ-1w; Mon, 02 Sep 2024 11:31:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=6kY7sHWynUIkD1E7Bzajr54ZN+BSADmn7O/QsG74i6I=; b=dkHihcA1kUTCDWw+Q+gT DHlwNmlVtRNfWYqExfIOJUP1ZmVmYgcwhyuCHvL2k5E64En0aJriySNcKoOITClkyKgpyXCFPkwhF FhvcDdCQ5H7LDYVwda9XaTonqZz5k63JZqmlP3rxRsDxza3XbuVn2jF0pKcqRQuLj+08jk3zPgxH0 /GzxWDVzxvZtYDcPMQY3/7IZPAEHO1g7OyDuN3NAyvLeSGo9ZlUJSPYQWHNDK6OKq4iG1YiahhAgf OHnJAz5M7FN9fN5HRDAWxQPu472TuwYvmNbrGkaICn4attLoVzPJzF0VlL3k8la2d1rpS3WeW38Vp FNmbNnHxhFMVRA==; In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Mon, 02 Sep 2024 16:54:31 +0200) 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:323295 Archived-At: > From: Gerd Möllmann > Cc: emacs-devel@gnu.org, rudalics@gmx.at > Date: Mon, 02 Sep 2024 16:54:31 +0200 > > > 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? > > 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. > 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.