Skip to content

wayland/background-effect: add ext-background-effect-v1 (blur region)#566

Merged
outfoxxed merged 2 commits intoquickshell-mirror:masterfrom
bbedward:ext-bg-effect
Mar 20, 2026
Merged

wayland/background-effect: add ext-background-effect-v1 (blur region)#566
outfoxxed merged 2 commits intoquickshell-mirror:masterfrom
bbedward:ext-bg-effect

Conversation

@bbedward
Copy link
Copy Markdown
Contributor

@bbedward bbedward commented Feb 13, 2026

core/region: add radius to create rounded regions

Adds BackgroundEffect that allows setting blur region on layer shell surfaces, additionally adds a radius option to Region similar to the vicinae pattern for making approximate rounded regions.

To test on a supported compositor: qs -p src/wayland/background_effect/test/manual/background_effect.qml

Usage is as:

BackgroundEffect.blurRegion: Region {
        item: root.contentItem
}

@YaLTeR
Copy link
Copy Markdown

YaLTeR commented Feb 14, 2026

Seems the region passed to the protocol also needs to be offset by the Qt CSD, if any:

image

Better visibility of the region:

image

@bbedward bbedward marked this pull request as ready for review February 14, 2026 16:29
@outfoxxed
Copy link
Copy Markdown
Member

outfoxxed commented Feb 16, 2026

For consistency with existing interfaces, this should probably be an attached object. See HyprlandWindow for an example.

Do we have any options for blur opacity exposed?

@bbedward
Copy link
Copy Markdown
Contributor Author

For consistency with existing interfaces, this should probably be an attached object. See HyprlandWindow for an example.

Changed it to an attached object, the only downside I guess is my thought was getting a BackgroundEffect.active to tell if the compositor had applied it/supported it

Do we have any options for blur opacity exposed?

That's not exposed by the protocol, its just blurRegion and capabilities { blur } pretty much. The effect parameters themselves would be set elsewhere, like niri's compositor config in this case.

Copy link
Copy Markdown
Member

@outfoxxed outfoxxed left a comment

Choose a reason for hiding this comment

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

Rather disappointed in the protocol itself but the implementation is mostly there.

Comment thread src/core/region.cpp Outdated
Comment thread src/wayland/background_effect/surface.cpp Outdated
Comment thread src/wayland/background_effect/surface.cpp Outdated
Comment thread src/wayland/background_effect/qml.cpp
Copy link
Copy Markdown
Member

@outfoxxed outfoxxed left a comment

Choose a reason for hiding this comment

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

Good overall

Comment thread src/wayland/background_effect/qml.cpp
Comment thread src/core/region.cpp
@outfoxxed
Copy link
Copy Markdown
Member

Added missing controls to the tester and noticed the corner radius is entirely unclamped at this point so it will break if you take it out of bounds. It should clamp at the point where its bounded by the size of the rect or space used by other corners

mecattaf added a commit to mecattaf/quickshellX that referenced this pull request Mar 15, 2026
…contribution walkthrough

Analysis of upstream PRs quickshell-mirror#566 and quickshell-mirror#351 to understand outfoxxed's review
patterns. Comprehensive quickshell style guide derived from codebase analysis.
Step-by-step walkthrough for contributing fixes to PR quickshell-mirror#351 (WebEngine support).

Key conclusion: no code fork needed — upstream PR quickshell-mirror#351 + spec flag is sufficient.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bbedward
Copy link
Copy Markdown
Contributor Author

Added missing controls to the tester and noticed the corner radius is entirely unclamped at this point so it will break if you take it out of bounds. It should clamp at the point where its bounded by the size of the rect or space used by other corners

Added the clamping to region

@outfoxxed outfoxxed force-pushed the master branch 4 times, most recently from ca90821 to 3cf65af Compare March 17, 2026 17:10
@outfoxxed
Copy link
Copy Markdown
Member

It seems like we're still getting intersections from circles in opposite corners

@bbedward
Copy link
Copy Markdown
Contributor Author

It seems like we're still getting intersections from circles in opposite corners

I changed the approach again, to cut the corners out of the rectangle. All the scenarios I tried in the tester seem to work for me

Copy link
Copy Markdown
Member

@outfoxxed outfoxxed left a comment

Choose a reason for hiding this comment

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

lgtm in testing

@outfoxxed
Copy link
Copy Markdown
Member

Modified to use ext-bg-effect from w-p and split commits. Will merge once CI passes.

@outfoxxed outfoxxed merged commit 6a244c3 into quickshell-mirror:master Mar 20, 2026
36 checks passed
mecattaf added a commit to mecattaf/quickshellX that referenced this pull request Mar 20, 2026
…contribution walkthrough

Analysis of upstream PRs quickshell-mirror#566 and quickshell-mirror#351 to understand outfoxxed's review
patterns. Comprehensive quickshell style guide derived from codebase analysis.
Step-by-step walkthrough for contributing fixes to PR quickshell-mirror#351 (WebEngine support).

Key conclusion: no code fork needed — upstream PR quickshell-mirror#351 + spec flag is sufficient.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

3 participants