Repository navigation
Conversation
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.
PR: core: synchronize fade-in animation start with onLockLocked event
Summary
Fixes an issue where the first ~400–500ms of the fade-in animation is skipped due to the asynchronous Wayland
ext-session-lock-v1protocol handshake.Problem & Timing Evidence
Previously,
g_pRenderer->startFadeIn()was called inCHyprlock::run()right before entering the main event loop. At this point, the session lock handshake with the compositor (fractional scale negotiation, surface creation, dimensions configuration) has not finished yet.Because the animation clock (
opacity) started ticking immediately, the first ~470ms of the animation was calculated and rendered into an unmapped surface. When the compositor finally granted the lock and displayed the first frame on the monitor, the animation was already halfway complete, resulting in a noticeable jump/skip.High-Precision Journal Logs (
journalctl -o short-precise)Before Patch (Unsynchronized):
477.289 msof animation played into an unmapped surface before the first frame was displayed.After Patch (Synchronized):
0.000 ms— 100% of the fade-in animation renders on the visible screen starting fromChanges
Moved
g_pRenderer->startFadeIn()fromCHyprlock::run()into theCHyprlock::onLockLocked()callback.Safety & Concurrency
onLockLocked()is dispatched synchronously fromwl_display_dispatch_pending()on the main thread, exactly likeCHyprlock::run().opacityis initialized to0.f, so the surface remains transparent while negotiating the lock with the compositor.onLockFinished()terminates cleanly without triggering the fade.