Repository navigation
Conversation
Turn on Hyprland's session_lock_xray only around lock and unlock so the lock cross-fades with the desktop. The lock is not reported secure until the fade-in is opaque, so a suspend never catches it see-through.
Contributor
|
The sleep path suspends once status() says secure. During the unlock fade the session lock is still held while the view is turning see-through, so an authentication just as the lid closed could suspend over the desktop. It now waits for the unlock to finish and locks again.
Left on, Hyprland keeps rendering the desktop under every later lock. The lock stays opaque, so nothing shows, but it is wasted work for as long as the screen is locked. Retry up to three times, unless xray is wanted again.
Turning xray back on for a lock or unlock fade now cancels any retry left from a failed xray-off, and the retry itself bails out while a fade needs the desktop rendered under the lock.
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.
Summary
Split out of #13918 at review, so the fade can be judged on its own. It is independent of #13918 and based on
quattro. Both PRs touchshell/plugins/lock/, so whichever merges second needs a small rebase.The lock currently cuts straight from the desktop to the lock screen and back. This fades it in and out over the live desktop instead.
Hyprland's
misc:session_lock_xraykeeps the workspaces rendering underneath the lock. It is switched on at runtime (hyprctl eval) only around a transition, and a config reload restores the configured value.The desktop can only show through while xray is on and the lock surface is transparent. Both are tied to these transitions:
status()doesn't report the locksecureuntil the fade-in is opaque on every screen.omarchy-system-sleep-lockwaits on that flag, so a suspend never catches the lock see-through. A fade-in that never reports back is forced opaque after 1 s. It isn't reported secure during the unlock fade either, so an authentication just as the lid closes makes the helper wait for the unlock and lock again.Most of the LockView diff is indentation from wrapping the lock content in one item that fades and scales. It reads best with whitespace hidden (
?w=1).The review threads on this code in #13918 (live desktop during the lock fade-in, second monitor, unlock fallback) were resolved there. This PR carries those fixes.
Testing
quattro: both files compile in Quickshell, and the lock, sleep, polkit and runtime-smoke suites undertest/shell.dpass. I haven't run thequattroversion live, since my machine runs the omarchy-mac package.lock-desktop-fade-test.shcovers the fade state logic against mocks: the unlock fade, cancelling it, the blank display, the secure flag, the fallback, and multiple screens.