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.bugs Subject: bug#60210: 30.0.50; tab-bar height not recalculated when face changes Date: Mon, 02 Jan 2023 05:29:50 +0200 Message-ID: <83bknh3975.fsf@gnu.org> References: <86sfh350ok.fsf@mail.linkov.net> <8335934yse.fsf@gnu.org> <83edsm2w2a.fsf@gnu.org> <86y1qurs4i.fsf@mail.linkov.net> <226b32f79feedbfa05f1@heytings.org> <83o7ri2jy7.fsf@gnu.org> <226b32f79fbbaf16469b@heytings.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3271"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60210@debbugs.gnu.org, juri@linkov.net To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 02 04:30:10 2023 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 1pCBWb-0000em-Tl for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Jan 2023 04:30:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCBWY-00067C-Do; Sun, 01 Jan 2023 22:30:06 -0500 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 1pCBWV-00066m-Cv for bug-gnu-emacs@gnu.org; Sun, 01 Jan 2023 22:30:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pCBWU-0001a1-S7 for bug-gnu-emacs@gnu.org; Sun, 01 Jan 2023 22:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pCBWU-00032L-Do for bug-gnu-emacs@gnu.org; Sun, 01 Jan 2023 22:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Jan 2023 03:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60210 X-GNU-PR-Package: emacs Original-Received: via spool by 60210-submit@debbugs.gnu.org id=B60210.167263019411639 (code B ref 60210); Mon, 02 Jan 2023 03:30:02 +0000 Original-Received: (at 60210) by debbugs.gnu.org; 2 Jan 2023 03:29:54 +0000 Original-Received: from localhost ([127.0.0.1]:42184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCBWM-00031f-0k for submit@debbugs.gnu.org; Sun, 01 Jan 2023 22:29:54 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCBWK-00031Q-J0 for 60210@debbugs.gnu.org; Sun, 01 Jan 2023 22:29:53 -0500 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 1pCBWE-0001Yv-L4; Sun, 01 Jan 2023 22:29:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qkBUUvC0HMySPuayayQKX4IrarS2GNuwDmG4eup1ixc=; b=WZDtYyUgeLfq O0cwV540xcQjxClVXtrZHeUk7Gt5fH3dB+V1uZ3fNTfh/lNuBIPJ/ZP1vJ/5sQRGpl4n51K3IUF8Q ytxop3Zg2X2Pnnfhkf6G4iyLYv5ts6RGWKNxILMkUOTZiL3Rbd4GWiVG2VDvUWdEnfzGXtL6sq70v COxIa6xepaIqFdisii4XNZ7otRLYd3KlbXr2AuqjWhGeaWBVwvGhl7ILLaBkhSROqr4ex2w6L6mcp 3A+37faiOy/BGuj4EOniNcPEeCN9QwImMkXe4W2lM/JAMP1GywinZUr3mhGmR4q9StFQHuEMmXJ94 Ztztl5HTLP0rNFnLHUV7pg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCBWB-0000Ny-Lk; Sun, 01 Jan 2023 22:29:46 -0500 In-Reply-To: <226b32f79fbbaf16469b@heytings.org> (message from Gregory Heytings on Sun, 01 Jan 2023 21:50:56 +0000) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:252307 Archived-At: > Date: Sun, 01 Jan 2023 21:50:56 +0000 > From: Gregory Heytings > cc: 60210@debbugs.gnu.org, juri@linkov.net > > > >> The bug is that, in redisplay_tab_bar, WINDOW_PIXEL_HEIGHT (w) uses the > >> height of the default face, which is 39 pixels, whereas new_height, > >> which is computed with tab_bar_height, uses the font of the tab-bar > >> face (variable-pitch in emacs -Q). On my system, new_height is (with a > >> single *scratch* tab) 36 pixels. Therefore new_height < > >> WINDOW_PIXEL_HEIGHT (w), when in fact according to the logic of the > >> code we should have new_height == WINDOW_PIXEL_HEIGHT (w). > > > > I'm not sure I understand how the above causes the tab bar not to be > > displayed, or become empty. AFAIU, it just means the frame's > > change_tab_bar_height_hook will be called. What did I miss? > > > > I do not fully understand it either yet. A simpler recipe, which does not > involve changing fonts: > > (set-face-attribute 'tab-bar nil :height 0.5) > (tab-bar-mode 1) > > This should display a tiny tab-bar, it displays a white bar instead. > > In redisplay_tab_bar, new_height is set to half the height of a canonical > line (17 and 34 on my system). Therefore redisplay_tab_bar returns true. > The next redisplay cycle finds that WINDOW_TOTAL_LINES (w) == 0, and does > nothing. Ah, if WINDOW_TOTAL_LINES becomes zero, that will indeed explain the problem. We should prevent that from happening as long as the tab bar is turned on.