From: Eli Zaretskii <eliz@gnu.org>
To: Gregory Heytings <gregory@heytings.org>
Cc: 60210@debbugs.gnu.org, juri@linkov.net
Subject: bug#60210: 30.0.50; tab-bar height not recalculated when face changes
Date: Mon, 02 Jan 2023 05:29:50 +0200 [thread overview]
Message-ID: <83bknh3975.fsf@gnu.org> (raw)
In-Reply-To: <226b32f79fbbaf16469b@heytings.org> (message from Gregory Heytings on Sun, 01 Jan 2023 21:50:56 +0000)
> Date: Sun, 01 Jan 2023 21:50:56 +0000
> From: Gregory Heytings <gregory@heytings.org>
> 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.
next prev parent reply other threads:[~2023-01-02 3:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 23:04 bug#60210: 30.0.50; tab-bar height not recalculated when face changes Gabriel do Nascimento Ribeiro
2022-12-25 8:35 ` Juri Linkov
2022-12-25 9:29 ` Eli Zaretskii
2022-12-26 0:24 ` Gregory Heytings
2022-12-26 12:23 ` Eli Zaretskii
2022-12-26 13:36 ` Gregory Heytings
2022-12-26 17:29 ` Juri Linkov
2022-12-26 17:40 ` Gregory Heytings
2023-01-01 17:56 ` Gregory Heytings
2023-01-01 18:22 ` Eli Zaretskii
2023-01-01 21:50 ` Gregory Heytings
2023-01-02 3:29 ` Eli Zaretskii [this message]
2023-01-02 15:05 ` Eli Zaretskii
2023-01-02 15:28 ` Gregory Heytings
2023-01-02 16:53 ` Eli Zaretskii
2023-01-04 13:53 ` Gregory Heytings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83bknh3975.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=60210@debbugs.gnu.org \
--cc=gregory@heytings.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).