x11_create_gc: apply opacity alpha to gc_bg_id fg pixel in ARGB mode#5
Open
blshkv wants to merge 1 commit into
Open
x11_create_gc: apply opacity alpha to gc_bg_id fg pixel in ARGB mode#5blshkv wants to merge 1 commit into
blshkv wants to merge 1 commit into
Conversation
cfg_bg_pixel stores only a 24-bit RGB value (high byte = 0x00). When the compositor is active the window uses an ARGB visual, and XFillRectangle with a GC whose fg pixel has alpha=0 produces a fully-transparent fill. ensure_back_buffer re-creates the back-pixmap on resize and immediately fills it with gc_bg_id to clear the undefined initial contents. Because gc_bg_id carried alpha=0 the entire background became invisible after any resize, revealing the window beneath the terminal. Fix: apply the same cfg_opacity→alpha fixup already used by x11_create_window (CW_BACK_PIXEL path) when building the gc_bg_id foreground pixel. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
blshkv
force-pushed
the
fix/gc-bg-alpha-argb-transparency
branch
from
July 21, 2026 14:15
3560bdb to
3763f50
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4
cfg_bg_pixelstores only a 24-bit RGB value (high byte =0x00). When the compositor is active the window uses an ARGB visual, andXFillRectanglewith a GC whose fg pixel hasalpha=0x00produces a fully-transparent fill.ensure_back_bufferrecreates the back-pixmap on every resize and immediately fills it withgc_bg_idto clear the undefined initial contents. Becausegc_bg_id.fg_pixelcarriedalpha=0, the entire background became invisible after any resize.Fix: apply the same
cfg_opacity → alphafixup already used inx11_create_window(CW_BACK_PIXELpath) when building thegc_bg_idforeground pixel.🤖 Generated with Claude Code