Skip to content

Conversation

@danielwe
Copy link
Contributor

@danielwe danielwe commented Oct 18, 2025

Taking a crack at fixing #9248. I figured the simplest and most robust solution would be if the macOS app always uses the TerminalWindow background on the Swift side to render the background, while all views including terminal surfaces have clear backgrounds. That way you avoid problems due to partially overlapping views with partial transparency, which is what #9248 is ultimately about. I think the implementation of #8801 would also be simpler once rebased on this.

I'd appreciate reviews of what I have here, so I won't mark this as draft. However, the PR is NOT ready to merge, as the Ventura titlebar tabs changes are not finished. I don't have an environment for testing those at the moment. If someone who does wants to take a crack at finishing this, please go ahead! Otherwise, I'll see what I can figure out within the next couple of days.

To do

  • Make necessary changes to Ventura titlebar tabs

@danielwe danielwe requested review from a team as code owners October 18, 2025 09:03
@danielwe
Copy link
Contributor Author

Screenshot 2025-10-18 at 01 34 10

@danielwe danielwe force-pushed the fix_scrollbar_transparency branch from a2b9a70 to a9d0b0a Compare October 18, 2025 10:16
@danielwe danielwe changed the title macOS: Always handle background rendering in effect layer macOS: Always handle background rendering in TerminalWindow Oct 18, 2025
@danielwe danielwe force-pushed the fix_scrollbar_transparency branch from eadb453 to 3dd4803 Compare October 18, 2025 20:46
Copy link
Member

@qwerasd205 qwerasd205 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the way. We briefly drew the background color as a part of the apprt view but switched back because doing so causes multiple issues which are unacceptable:

  • Breaks alpha-blending, since the blending of text with the default background is done by the system compositor instead of being controlled by us.
  • Breaks the behavior of custom shaders that care about the background color.
  • Less important, but this also increases the complexity for people using Ghostty code to embed a terminal in another application.

As a side note, if were were to go forward with this solution (which we shouldn't), controlling this behavior by branching on the OS rather than making it runtime configurable by the apprt would not be a good idea.

@danielwe
Copy link
Contributor Author

I understand, thanks for explaining! Replaced by #9291.

@danielwe danielwe closed this Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants