Repository navigation
linux: the desktop's blur behind the window, behind FIZZY_BLUR_BEHIND=1 - #237
Merged
Merged
Conversation
foxnne
force-pushed
the
linux/blur-behind
branch
from
October 8, 2026 16:03
94c817f to
820c53e
Compare
12 tasks
On Wayland the window asks for a blur behind its frame through ext-background-effect-v1, the protocol GNOME (Mutter 51) and KDE (Plasma 6.7) now share, or KDE's older org_kde_kwin_blur. Where the compositor blurs, the window's base is translucent over it at the window opacity, as it is over macOS's vibrancy and Windows' Acrylic (`Editor.windowBase`, `LiquidField.publishOpaqueWindow`). Off unless `FIZZY_BLUR_BEHIND=1` until it has been seen on a desktop that blurs. Step 4 of docs/WINDOWS_LINUX_GLASS_PLAN.md. - `platform/wayland_blur.zig`: SDL's own libwayland-client (`RTLD_NOLOAD`), the two protocols declared by hand and marshalled from argument arrays, on an event queue of its own so nothing here dispatches SDL's events. The region is surface state, sent only when it changes and taken with the commit the frame's present makes, so a resize changes the blur and the picture together. "None" is an empty region, not a null one, which would hand the surface back to the compositor's default. On KDE's protocol, where KWin (through Plasma 6.6) blurs the whole window behind a blur object with an empty region, "none" is the object unset and released. Where the compositor reports no blur, nothing is asked. The first probe logs what it found. - `platform/blur_region.zig` (std-only, `fizzy-blur-region-tests`): the frame's rounded corners stepped into rows, since the protocols take whole rectangles. - `linux_titlebar.blurBehind`: the frame inside the shadow's margin (`frameInsets`); the Editor asks for it while the window is translucent, square when maximized. Checked: the region tests; native, Linux, Windows and web builds and the test gates; the protocols' opcodes against wayland.app and plasma-wayland-protocols; KWin's empty-region rule in its Plasma/6.6 source; a stub compositor speaking both protocols (cloud session); and fizzy on Ubuntu 26.04 / GNOME 50 (aarch64 VM, Wayland), which has neither protocol: one probe on fizzy's own queue, `ext-background-effect-v1 absent, org_kde_kwin_blur absent` logged, no protocol error, window opaque. Not seen on GNOME 51 or Plasma 6.7, where the blur would show. Needs the `envSwitch` fix below it: before it, `FIZZY_BLUR_BEHIND` read as `FIZZY_POPOUT`. wayland-protocols 1.45 numbered the blur capability 0; later releases made it the bit 1, which this follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
foxnne
force-pushed
the
linux/blur-behind
branch
from
October 8, 2026 18:01
820c53e to
f5ccde2
Compare
foxnne
marked this pull request as ready for review
October 8, 2026 18:02
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.
Part of #226 (
docs/NATIVE_WINDOWS_PLAN.md, "Linux — the compositor's blur"); step 4 ofdocs/WINDOWS_LINUX_GLASS_PLAN.md(#236).What changes
With
FIZZY_BLUR_BEHIND=1, on a Wayland compositor that blurs, the window's base goes translucent at the window opacity over the desktop's blur, as it already does over macOS's vibrancy and Windows' Acrylic. Elsewhere, and without the switch, nothing changes: the window stays opaque.platform/wayland_blur.zig: bindsext-background-effect-v1(GNOME 51, Plasma 6.7, niri) or KDE'sorg_kde_kwin_blur.RTLD_NOLOAD), with both protocols declared by hand, on an event queue of its own.platform/blur_region.zig(std-only, unit tested): steps the rounded frame into rectangles.linux_titlebar.blurBehindandEditor.tick: the blur covers the frame inside the shadow's margin while the window is translucent, and is square when maximized.Off by default until someone sees it on a desktop that blurs.
SDK impact
Verified
FIZZY_BLUR_BEHIND=1 WAYLAND_DEBUG=client). GNOME 50 has neither protocol, so this covers the "absent" path only:get_registryon fizzy's own unnamed queue;ext-background-effect-v1 absent, org_kde_kwin_blur absent;wl_display.error;ext-background-effect-v1) and plasma-wayland-protocols'blur.xml;src/plugins/blur/blur.cpponPlasma/6.6. Master only takes a non-empty region.fizzy-blur-region-tests(5 tests).zig build,test,test-integration,check-web,test-sdk-version, and the Windows and Linux cross-builds.comptime-gated to Linux; it builds on all of them).Relies on the
envSwitchfix (#235, merged): before it,FIZZY_BLUR_BEHINDread asFIZZY_POPOUT.Follow-ups
xdg_popups) are the other half of step 4, not built.🤖 Generated with Claude Code