-
Notifications
You must be signed in to change notification settings - Fork 16
fix: fix flash black on login #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This will work as intended.
|
Hi @calsys456. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts the session activation guard to validate against the correct system user name when no valid XDG session ID is present. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've found 1 issue, and left some high level feedback:
- Consider replacing the hard-coded username string ("dde") with a named constant or configuration value so that any future username changes are easier to manage and less error-prone.
- It may be worth double-checking that all related code paths using the special ddm/dde user are updated consistently so this behavioral change does not introduce inconsistencies elsewhere.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider replacing the hard-coded username string ("dde") with a named constant or configuration value so that any future username changes are easier to manage and less error-prone.
- It may be worth double-checking that all related code paths using the special ddm/dde user are updated consistently so this behavioral change does not introduce inconsistencies elsewhere.
## Individual Comments
### Comment 1
<location> `src/daemon/Display.cpp:133` </location>
<code_context>
void Display::activateSession(const QString &user, int xdgSessionId) {
- if (xdgSessionId <= 0 && user != QStringLiteral("ddm")) {
+ if (xdgSessionId <= 0 && user != QStringLiteral("dde")) {
qCritical() << "Invalid xdg session id" << xdgSessionId << "for user" << user;
return;
</code_context>
<issue_to_address>
**suggestion:** Consider centralizing the special user name instead of hardcoding the string literal here.
This condition now relies on the literal "dde". If this is a well-known system user, define it once (e.g., as a constant or config value) and reference it here to avoid future mismatches and make the special handling explicit.
Suggested implementation:
```cpp
}
namespace {
const QString kDisplayManagerUser = QStringLiteral("dde");
}
void Display::activateSession(const QString &user, int xdgSessionId) {
if (xdgSessionId <= 0 && user != kDisplayManagerUser) {
qCritical() << "Invalid xdg session id" << xdgSessionId << "for user" << user;
return;
}
```
If there are other occurrences of the literal `"dde"` (or the previous `"ddm"`) in this file representing the same special system user, they should also be replaced with `kDisplayManagerUser` for consistency.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: calsys456, zccrs 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 will work as intended.
Summary by Sourcery
Bug Fixes: