gtk: scope the backdrop background to window.background

Unscoped window:backdrop repainted ghostty opaque on unfocus.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-08-31 19:53:33 +01:00
parent 0bc16d0cdc
commit 7a4bda9a21

View file

@ -177,7 +177,12 @@ let
headerbar { min-height: 0; padding: 0; margin: 0; } headerbar { min-height: 0; padding: 0; margin: 0; }
headerbar .title { font-size: 0; } headerbar .title { font-size: 0; }
window:backdrop { /* .background, not bare `window`: GTK puts that class on a window that
paints a solid background, and a transparent app takes it off — ghostty
drops it whenever background-opacity < 1. Unscoped, this rule painted
@window_bg_color back over ghostty the moment it lost focus, so a 70%
terminal went fully opaque on every alt-tab. */
window.background:backdrop {
background-color: @window_bg_color; background-color: @window_bg_color;
color: @window_fg_color; color: @window_fg_color;
} }