Skip to content

macOS: implement set_blur with NSVisualEffectView. kept private-apple-apis for the radius. - #4632

Open
pszsh wants to merge 1 commit into
rust-windowing:masterfrom
pszsh:blur-nsvisualeffectview
Open

macOS: implement set_blur with NSVisualEffectView. kept private-apple-apis for the radius.#4632
pszsh wants to merge 1 commit into
rust-windowing:masterfrom
pszsh:blur-nsvisualeffectview

Conversation

@pszsh

@pszsh pszsh commented Jul 17, 2026

Copy link
Copy Markdown

This is #4541 with the TODO filled in - NSVisualEffectView as the public default, your feature left alone for the radius.

I tried to keep it simple, and answer @kchibisov's point about subviews, and follow the conventions I could see. The rest is in the changelog.

Let me know if you'd rather have it a different way. As before, happy to make changes.

@pszsh
pszsh requested a review from madsmtm as a code owner July 17, 2026 04:11
@pszsh
pszsh force-pushed the blur-nsvisualeffectview branch from 3ac18e6 to 18d2a46 Compare July 17, 2026 07:06
@pszsh

pszsh commented Jul 22, 2026

Copy link
Copy Markdown
Author
error[duplicate]: found 2 duplicate entries for crate 'syn'
    ┌─ /github/workspace/Cargo.lock:132:1
    │  
132 │ ╭ syn 2.0.119 registry+https://github.com/rust-lang/crates.io-index
133 │ │ syn 3.0.2 registry+https://github.com/rust-lang/crates.io-index
    │ ╰───────────────────────────────────────────────────────────────┘ lock entries

Yeah, I mean I could make a choice here, but I don't know if I'd make the one you would. It's really up to y'all.

Please let me know if I'm just being a nuisance, I'm just trying to help but if the way I'm going about things is just wrong or fundamentally missing some larger point that I am not seeing for whatever reason, and I might as well not bother...

I'd like to know that so that I can stop wasting everyone's time. I value your time, I am only trying to save you some. One way or another I would appreciate any feedback, to know if It's worth it to keep trying to make this pull request.

Thanks,

Jess

@tronical tronical left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@pszsh This is fixed now in master. I've also merged #4541 . Could you rebase your change that just fills in the missing pieces you meant to fill in? :)

@pszsh
pszsh force-pushed the blur-nsvisualeffectview branch from 61398cf to 78d2b13 Compare July 28, 2026 18:09
@pszsh

pszsh commented Jul 28, 2026

Copy link
Copy Markdown
Author

Cool beans. Hope this is what you were looking for, if not, let me know and I'll try again.

@pszsh
pszsh force-pushed the blur-nsvisualeffectview branch from 78d2b13 to cb38b2a Compare July 30, 2026 05:17
@pszsh
pszsh requested a review from tronical July 30, 2026 05:17
@pszsh
pszsh force-pushed the blur-nsvisualeffectview branch from cb38b2a to da132af Compare August 4, 2026 01:16
Fills in the TODO left when `CGSSetWindowBackgroundBlurRadius` moved
behind `private-apple-apis`, so blur works again by default.

The window's `contentView` is now a plain container `NSView` holding
`WinitView`, and the effect view is installed as a sibling ordered
below it, so the view returned by `raw-window-handle` is never
unlinked from the window. With `private-apple-apis` enabled, the
private API is used exactly as before.

The material is tinted and follows the window's appearance, so the
fixed radius of 80 is not reproduced; that stays available through
the feature.
@pszsh
pszsh force-pushed the blur-nsvisualeffectview branch from da132af to 83baa7d Compare August 8, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants