From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#46827: Broken initial size of GTK3 frame Date: Mon, 10 May 2021 10:23:26 +0200 Message-ID: <6565dd1a-5933-00e3-4427-c713aa36d6d5@gmx.at> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18449"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46827@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 10 10:24:16 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 1lg1D6-0004fA-7G for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 May 2021 10:24:16 +0200 Original-Received: from localhost ([::1]:44018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lg1D4-0005tB-Oe for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 May 2021 04:24:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg1Cs-0005t1-R4 for bug-gnu-emacs@gnu.org; Mon, 10 May 2021 04:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lg1Cs-0000aH-Iq for bug-gnu-emacs@gnu.org; Mon, 10 May 2021 04:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lg1Cs-0005QQ-DT for bug-gnu-emacs@gnu.org; Mon, 10 May 2021 04:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 May 2021 08:24: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.162063501720821 (code B ref 46827); Mon, 10 May 2021 08:24:02 +0000 Original-Received: (at 46827) by debbugs.gnu.org; 10 May 2021 08:23:37 +0000 Original-Received: from localhost ([127.0.0.1]:57327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lg1CS-0005Pl-S7 for submit@debbugs.gnu.org; Mon, 10 May 2021 04:23:37 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:42181) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lg1CQ-0005PO-9f for 46827@debbugs.gnu.org; Mon, 10 May 2021 04:23:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1620635008; bh=hdtwCy7089Qn0aqyJerlX/0FkPyN1krWE5Ep9s7LlbA=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=ahijmEbCqpvJRogLhb3JBUaiEIRmuOfd6/dpjDhm/wg7LS68T0Awh+SnAp0dpE2TZ 3LM22tS5GgGKsjK+pLrIpmTO8iONLrKTAHgzfLjLxSPgpSfqikHlCGvYGzhp3eFEOo VmQXHdwlq1aXvXLLFln6rKta5q1uRi04ZyCKTPq4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.90]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MwfWU-1lIArS00WQ-00y7TP; Mon, 10 May 2021 10:23:28 +0200 In-Reply-To: <87o8dmppdn.fsf@mail.linkov.net> Content-Language: en-US X-Provags-ID: V03:K1:suduN7ICPDDo4O1UwpYwaawUgwYYA4cFOI833gluK2esstVYxE6 DueCu5+wF5VHPW6Q90jxPPluFvqr4qNodJ3mPGx6UM/PWl0guO3MH7rz+KDytYv2Fi5VHwm qeR4NvpFHfCULpZQ8er8e6NbQFvxQyyc3bV2l2lpi2yqyvP9q1uMQLLqCCyFMeMLx/pmATd bL55Fr9d/B7aWcZUJ/xIA== X-UI-Out-Filterresults: notjunk:1;V03:K0:TMSc4ytvtXI=:9bHaUYntZEnktKIAbDHzE+ qfhMo28+eDCMz4pC8VGnM/atvnI/jIornrg5BLPksevPMtY8DxvB/kVwKGDQteUxKVVxFf2dS 43rda1TwaWStY1uTUiPQNM36GYwS9QWWo8gbSnY3kLIPOPSUeUKWF8zrfg7ogIDo84nCa1BB/ yz9D73YAQWHecSolY9Ar/CPlg6ZJkYdapzxA88ZtvoPV0t9BNzV4BBD2RvQnoLjBJ0YU8SCNy RZz0IPF6AngmUu+MR8d+BI1i0GvE3hddPy+RoZiVYIVVzAkLebsStUDSzT2u5GLQgp+pGvjln ZQBtxavDwXSWW++c3BLGZvmz0Zy3Uu9U0v37/eKWeIwhh8d3QmnN4xUfY4qna2uuntWiWq+Gq 2XREjdh1tTQrTTtNqV4Sy8ZqIPtLeghH4g7AG/xIvoqqhlu4TH0OQG7vlLuks+rUUO1Cc6rtW hARkRy2ycG2rkrsvAtBVogzP9m2bZsRCVkQ2/qBtmnDdl9RbWbBHhoA60Ww8cYxiWEB5vH+IY g1NtnjZDeCkkJTi4z4zTMeeOR0gGyQa2Zj/0KvMjHC5V6l3/H35z5rR2vWNSnWomL6MMVSlxA nzM7m7KBkJbMz2eQ3aRYXXf6zs/Z7z4wr4JgHGnFpDAg0+ecIv427+ooUJtcOFBKBTq/mZa5+ 2uD5B5WbXnLaz97L5EwKMHk91/6VYlGemsHoEEXN6dEKujA0JJIfu0MBvmg/tpek8sZYbK/vV 4CdaKH1KcLjO86H+9DtNqtuvWuCQrgDXrN45grLvGw3/f+qY8jXpx/T/P+gtemUCcexsEBYt 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:206127 Archived-At: >>> But maybe sometimes the value of tab-bar-lines >>> becomes more than 1? >> >> It's 2 after the tab bar has been produced for the first time by the >> display code. And that is what's been causing trouble for you. The >> value was oscillating between 1 and 2. > > Very strange indeed, I can't find the constant 2 in the source code. Because for X it's done in x_change_tab_bar_height as (I suppose you wrote that): 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. 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. martin