From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#46827: Broken initial size of GTK3 frame Date: Mon, 10 May 2021 23:39:19 +0300 Organization: LINKOV.NET Message-ID: <87r1iexuoc.fsf@mail.linkov.net> References: <6caa020a-084c-e3f2-7a34-262f7127b21b@gmx.at> <871ratp19y.fsf@linkov.net> <36799c0d-a26b-a862-2b18-fb9bf9f3f30c@gmx.at> <87sg384r70.fsf@mail.linkov.net> <7471b198-a5ad-f79d-46fe-5498a299c964@gmx.at> <87eeerwvoq.fsf@mail.linkov.net> <9cde65ef-b150-121b-bd7f-5852406180c1@gmx.at> <87bl9uqjuq.fsf@mail.linkov.net> <874kfk50f4.fsf@mail.linkov.net> <7e503d11-5cd0-9ed7-e75a-5977eb5ecf3a@gmx.at> <3096e1f1-0090-5892-c752-bd82d974214e@gmx.at> <871ranagzo.fsf@mail.linkov.net> <9736f3c8-157c-423d-55ad-21118c48d939@gmx.at> <93f1d912-a26f-ccf9-926b-731ad02d7734@gmx.at> <87sg32chgv.fsf@mail.linkov.net> <63e9cb33-afc0-8e9c-4e35-78f5e504eb47@gmx.at> <87h7jhgiqs.fsf@mail.linkov.net> <87o8dmppdn.fsf@mail.linkov.net> <6565dd1a-5933-00e3-4427-c713aa36d6d5@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30987"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 46827@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 10 23:30:38 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1lgDU6-0007wM-Lr for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 May 2021 23:30:38 +0200 Original-Received: from localhost ([::1]:55162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgDU5-0002X2-Nx for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 May 2021 17:30:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgDSZ-0000iE-7Y for bug-gnu-emacs@gnu.org; Mon, 10 May 2021 17:29:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51118) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgDSY-0005ph-8n for bug-gnu-emacs@gnu.org; Mon, 10 May 2021 17:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lgDSY-0001rI-4g for bug-gnu-emacs@gnu.org; Mon, 10 May 2021 17:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 May 2021 21:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46827 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 46827-submit@debbugs.gnu.org id=B46827.16206821177113 (code B ref 46827); Mon, 10 May 2021 21:29:02 +0000 Original-Received: (at 46827) by debbugs.gnu.org; 10 May 2021 21:28:37 +0000 Original-Received: from localhost ([127.0.0.1]:34431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgDS9-0001qd-27 for submit@debbugs.gnu.org; Mon, 10 May 2021 17:28:37 -0400 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:58709) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgDS7-0001qQ-HJ for 46827@debbugs.gnu.org; Mon, 10 May 2021 17:28:36 -0400 Original-Received: from mail.gandi.net (m91-129-102-166.cust.tele2.ee [91.129.102.166]) (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 0F007100003; Mon, 10 May 2021 21:28:27 +0000 (UTC) In-Reply-To: <6565dd1a-5933-00e3-4427-c713aa36d6d5@gmx.at> (martin rudalics's message of "Mon, 10 May 2021 10:23:26 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:206194 Archived-At: > x_change_tab_bar_height (struct frame *f, int height) > { > int unit = FRAME_LINE_HEIGHT (f); > int old_height = FRAME_TAB_BAR_HEIGHT (f); > int lines = (height + unit - 1) / unit; > Lisp_Object fullscreen = get_frame_param (f, Qfullscreen); > > /* Make sure we redisplay all windows in this frame. */ > fset_redisplay (f); > > /* Recalculate tab bar and frame text sizes. */ > FRAME_TAB_BAR_HEIGHT (f) = height; > FRAME_TAB_BAR_LINES (f) = lines; > store_frame_param (f, Qtab_bar_lines, make_fixnum (lines)); > > If you call this with a HEIGHT that is larger than FRAME_LINE_HEIGHT you > already get a `tab-bar-lines' parameter that is larger than 1. With a > very small FRAME_LINE_HEIGHT and/or a very tall tab bar you may get more > than 2 lines. Indeed, initially: lines = (17 + 17 - 1) / 17 = 1 but later: lines = (19 + 17 - 1) / 17 = 2 > This is an idiosyncrasy of our "live in a graphic world but think in > terms of a TTY" philosophy. The parameter should be a boolean and have > been called something like 'tab_bar_p' but there's no chance to change > that any more. But what if the tab bar is so long that it wraps and really occupies 2 lines on a GUI?