Subject: bug#59271: 29.0.50; Wrong tab-bar height at startup

From: Gabriel <[email-masked]>
Date: Mon, 14 Nov 2022 02:48:44 -0300

Description:
The tab-bar height is wrong (bigger than expected) at startup. It only
happens when tab-bar is enabled in init.el. After emacs is loaded, the
tab-bar height can be "fixed" by toggling the tab-bar.

A 'git bisect' indicates that the commit
52d4c98cec0901ef5cc1c55d5b3b33ac9d9c519f introduced this bug.
 
Steps:
1) Use the following in init.el:
(tab-bar-mode 1)
2) Run emacs
   - tab-bar is shown, notice the height
3) M-x tab-bar-mode RET (hide tab-bar)
4) M-x tab-bar-mode RET (show tab-bar)
   - tab-bar height is smaller than it was at startup

The video below demonstrates the issue:

---
Gabriel

In GNU Emacs 29.0.50 (build 18, x86_64-pc-linux-gnu, GTK+ Version
 3.24.33, cairo version 1.16.0) of 2022-11-14 built on 4BQPCJ3
Repository revision: c0474ca21dd76cafbd1a04fd32d4a0bd42de6351
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Ubuntu 22.04.1 LTS

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LC_CTYPE: pt_BR.UTF-8
  value of $LC_MONETARY: pt_BR.UTF-8
  value of $LC_NUMERIC: pt_BR.UTF-8
  value of $LC_TIME: pt_BR.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  display-fill-column-indicator-mode: t
  display-line-numbers-mode: t
  whitespace-mode: t
  global-subword-mode: t
  subword-mode: t
  recentf-mode: t
  savehist-mode: t
  icomplete-vertical-mode: t
  icomplete-mode: t
  minibuffer-depth-indicate-mode: t
  delete-selection-mode: t
  display-time-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-history-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  window-divider-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime
smime gnutls dig gnus-sum shr pixel-fill kinsoku url-file svg dom
gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap
nnmail mail-source utf7 nnoo parse-time iso8601 gnus-spec gnus-int
gnus-range gnus-win emacsbug message yank-media puny rfc822 mml mml-sec
epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader modus-operandi-theme
cursor-sensor display-fill-column-indicator display-line-numbers
whitespace diary-lib diary-loaddefs modus-vivendi-theme cal-julian solar
cal-dst cal-menu calendar cal-loaddefs gnus nnheader gnus-util
text-property-search time-date range sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils cl-extra help-mode cap-words superword
subword recentf tree-widget dired dired-loaddefs disp-table em-hist
em-pred esh-mode ring eshell esh-cmd generator esh-ext esh-opt esh-proc
esh-io esh-arg esh-module esh-groups esh-util files-x savehist icomplete
mb-depth delsel modus-themes time doom-modeline-autoloads try-autoloads
all-the-icons-completion-autoloads consult-autoloads
all-the-icons-ibuffer-autoloads json-mode-autoloads rx
all-the-icons-dired-autoloads shrink-path-autoloads
dockerfile-mode-autoloads json-snatcher-autoloads corfu-autoloads
orderless-autoloads inf-ruby-autoloads compat-autoloads
markdown-mode-autoloads f-autoloads go-mode-autoloads
docker-compose-mode-autoloads yaml-mode-autoloads vertico-autoloads
doom-themes-autoloads treemacs-all-the-icons-autoloads
treemacs-autoloads cfrs-autoloads posframe-autoloads ht-autoloads
hydra-autoloads lv-autoloads pfuture-autoloads ace-window-autoloads
avy-autoloads s-autoloads info dash-autoloads all-the-icons-autoloads
marginalia-autoloads finder-inf package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x
map byte-opt gv bytecomp byte-compile url-vars pcase cus-edit pp
cus-load icons wid-edit cl-loaddefs cl-lib rmc iso-transl tooltip cconv
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process
emacs)

Memory information:
((conses 16 422982 472115)
 (symbols 48 25069 46)
 (strings 32 109738 32800)
 (string-bytes 1 3047105)
 (vectors 16 35854)
 (vector-slots 8 461466 271265)
 (floats 8 566 1258)
 (intervals 56 537 140)
 (buffers 984 11))