Blend the blit pipeline so popups don't get a black outline - #27
Open
fegauthier-paragon wants to merge 1 commit into
Open
Blend the blit pipeline so popups don't get a black outline#27fegauthier-paragon wants to merge 1 commit into
fegauthier-paragon wants to merge 1 commit into
Conversation
Popups are rendered into the parent toplevel's drawable at an offset, through the same blit pipeline as the toplevel itself. That pipeline was built with blending disabled, so a popup's translucent edges — a menu's shadow, its rounded corners — replaced what was underneath with transparent black instead of compositing over it. Every context menu came out with a black outline. Enabling blending fixes the popup case and leaves the toplevel case unchanged: a toplevel is drawn over the clear colour, so replacing and blending give the same result there. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Owner
|
I've been busy lately, I'll check the code and consider merging your PR in two weeks |
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.
Every context menu in a client rendered with a black outline around it. In rootless mode with an Electron app it's very visible, since those draw their own menus with a shadow and rounded corners.
Cause
render_toplevel_popupsdraws popups into the parent toplevel's drawable, at an offset, using the sameblit_pipelineas the toplevel. That pipeline was built with blending off:The comment holds for a toplevel — its alpha=0 regions end up showing the clear colour whether you replace or blend, so the distinction is invisible there. It does not hold for a popup: the popup is drawn over already-rendered toplevel content, so its translucent edges replace that content with transparent black rather than compositing over it. That's the outline.
Fix
One flag.
border_pipelineon the next line is already built with blending enabled, so this makes blit consistent with it.Verified
Built on
mainand run in rootless mode over waypipe with Claude Desktop for Linux (Electron) in a Lima VM: menus composite correctly, shadows and rounded corners land as they should, and toplevel rendering is unchanged.If
blending = falsewas guarding a case I haven't hit — a client whose surface genuinely needs to punch through — the narrower fix is a second, blended pipeline used only byrender_toplevel_popups, and I'm happy to switch this PR to that shape.Aside
Thanks for the rootless display-worker design — spawning one worker per application gives each guest window its own Dock entry and tile on macOS, which is exactly what I needed and worked without patching anything.