Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting macOS tabs title bar style and background opacity and restoring window save state causes tabs to be hidden #3049

Open
anirudhsama opened this issue Dec 21, 2024 · 2 comments
Labels
contributor friendly A well-scoped, approachable issue for someone looking to contributor. gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/macos

Comments

@anirudhsama
Copy link

I've configured Ghostty with the following settings and it results in something weird.

background-opacity = 0.95
background-blur-radius = 20

# macOS specific features
macos-titlebar-style = tabs
macos-option-as-alt = true 
window-save-state = always
window-vsync = true
window-colorspace = display-p3
quick-terminal-screen = macos-menu-bar

Steps to reproduce:

  1. Configure with the above settings.
  2. Open a few tabs.
  3. Quit Ghostty.
  4. Open Ghostty.

Bug:

  • The tab bar only shows the current active tab, not all the tabs that are available.
  • But we can navigate to it via key binds like cmd+[ and cmd+].

Other observations:

  • When we open a new tab after relaunching, then all the tabs in the tab bar becomes visible.
  • As long as the newly opened tab is active, all tabs are visible.
  • But when the new tab opened is closed or we navigate to an older (restored) tab, then the tabs are invisible.

Recording: https://cln.sh/CDXlLKBd

macOS Sequoia 15.2

❯ ghostty --version
Ghostty 0.1.0-main+05fd5e0c

Version
  - version: 0.1.0-main+05fd5e0c
  - channel: tip
Build Config
  - Zig version: 0.13.0
  - build mode : builtin.OptimizeMode.ReleaseFast
  - app runtime: apprt.Runtime.none
  - font engine: font.main.Backend.coretext
  - renderer   : renderer.Metal
  - libxev     : main.Backend.kqueue
@mitchellh
Copy link
Contributor

I thought we documented somewhere that window state restoration doesn't work well with titlebar tabs... oh well, this is worth fixing. The issue is a race condition between save state restoration and titlebar tab setup (I think). This can usually fixed by deferring titlebar setup by a few event loop ticks. Easier said than done. 😄

@mitchellh mitchellh added os/macos contributor friendly A well-scoped, approachable issue for someone looking to contributor. gui GUI or app issue regardless of platform (i.e. Swift, GTK) labels Dec 21, 2024
@anirudhsama
Copy link
Author

Just checked the documentation and it does say that. Apologies 😅. It works fine if the background-opacity is 1 and thats the configuration I had been using for a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly A well-scoped, approachable issue for someone looking to contributor. gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/macos
Projects
None yet
Development

No branches or pull requests

2 participants