sync: from linuxdeepin/dde-session-shell - #531
Merged
Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideIntroduces a 300 ms single-shot wake-up authentication timer so back-to-back ActiveChanged and PrepareForSleep signals result in only one authentication creation, while cancelling pending work during sleep or deactivation. Sequence diagram for deduplicated wake-up authenticationsequenceDiagram
participant ActiveChanged
participant PrepareForSleep
participant LockWorker
participant WakeUpAuthTimer
participant Authentication
ActiveChanged->>LockWorker: activeChanged()
LockWorker->>WakeUpAuthTimer: start()
PrepareForSleep->>LockWorker: prepareForSleepChanged()
LockWorker->>WakeUpAuthTimer: start()
WakeUpAuthTimer-->>LockWorker: timeout()
LockWorker->>Authentication: createAuthentication(name())
alt system enters sleep or lock deactivates
LockWorker->>WakeUpAuthTimer: stop()
LockWorker->>Authentication: endAuthentication(m_account, AT_All)
LockWorker->>Authentication: destroyAuthentication(m_account)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/dde-lock/lockworker.cpp" line_range="160" />
<code_context>
if (active && m_model->visible()) {
- createAuthentication(m_model->currentUser()->name());
+ m_wakeUpAuthTimer->start();
} else {
+ m_wakeUpAuthTimer->stop();
</code_context>
<issue_to_address>
**issue (bug_risk):** The timer remains armed when `visibleChanged(false)` hides the lock screen, because that handler does not stop `m_wakeUpAuthTimer`. If the screen becomes hidden during the 300 ms delay, the timeout still calls `createAuthentication()` and recreates authentication for an invisible lock screen.
**Triggers:** When `ActiveChanged(true)` starts the timer and the model becomes invisible before the 300 ms timeout.
**Suggested fix:** Stop `m_wakeUpAuthTimer` in the model's `visibleChanged(false)` path and recheck visibility before creating authentication.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Synchronize source files from linuxdeepin/dde-session-shell. Source-pull-request: linuxdeepin/dde-session-shell#83
deepin-ci-robot
force-pushed
the
sync-pr-83-nosync
branch
from
September 1, 2026 12:26
363107e to
a0c7af3
Compare
52cyb
approved these changes
Sep 1, 2026
Contributor
Author
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 52cyb, deepin-ci-robot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
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.
Synchronize source files from linuxdeepin/dde-session-shell.
Source-pull-request: linuxdeepin/dde-session-shell#83
Summary by Sourcery
Stabilize lock-screen authentication during system wake-up by coalescing closely timed resume signals.
Bug Fixes:
Enhancements:
Chores: