Skip to content

renderer: add opt-in compositor fade for live lock backgrounds - #1077

Open
ph0en1st wants to merge 1 commit into
hyprwm:mainfrom
ph0en1st:feat/compositor-fade
Open

ph0en1st wants to merge 1 commit into
hyprwm:mainfrom
ph0en1st:feat/compositor-fade

Conversation

@ph0en1st

Copy link
Copy Markdown

With Hyprland's session_lock_xray and session_lock_blur enabled, a transparent lock surface can show a live, blurred desktop. The current screenshot-based fade obscures that live scene during the transition, and compositor blur can disappear abruptly when the lock surface is removed.

This adds general:compositor_fade, disabled by default. When enabled, it uses hyprland_surface_v1.set_opacity to fade the surface content and compositor blur together, following the existing fadeIn and fadeOut animations. Widgets retain their own configured opacity, without applying the global fade twice. This uses an existing Hyprland protocol and requires no changes to Hyprland itself.

general {
    compositor_fade = true
}

For a live backdrop, use a transparent background and enable misc:session_lock_xray and misc:session_lock_blur in Hyprland. This fades the blur's contribution; it does not animate the blur radius.

The standard client-side fade remains the default and is also used if the compositor does not advertise the protocol. Screenshots needed only for the old fade are skipped; an explicit background:path = screenshot still works. Authentication and session-lock handling are unchanged.

I'm using a patched build with this feature daily in my own Hyprland setup. The background stays live, and both the lock screen content and blur fade smoothly when locking and unlocking.

Additional validation:

  • Release build with CMake/Ninja and formatting/whitespace checks.
  • Compatibility checks with the option disabled, the protocol unavailable (simulated), explicit screenshots using DMA-BUF and SHM, and animations disabled. These checks used SIGUSR1 to unlock.

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.

1 participant