fix(lockscreen): prevent window interaction on secondary screens whil…#1057
Merged
Conversation
Reviewer's GuideGreeter is now always visible across all outputs to intercept input, while LockView and ShutdownView are instantiated via Loaders only on the primary output to avoid interactive lock UI on secondary screens. Flow diagram for lockscreen behavior across multiple outputsflowchart LR
subgraph Outputs
primary[primary_output]
secondary[secondary_output]
end
Greeter[Greeter visible:true]
LockLoader[lockViewLoader active: primaryOutputName==output.name]
ShutdownLoader[shutdownViewLoader active: showShutdownView && primaryOutputName==output.name]
primary --> Greeter
secondary --> Greeter
Greeter --> LockLoader
Greeter --> ShutdownLoader
LockLoader --> LockView[LockView instantiated]
ShutdownLoader --> ShutdownView[ShutdownView instantiated]
secondary -. no active loaders .- LockView
secondary -. input intercepted by Greeter .- ShutdownView
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, and left some high level feedback:
- Changing
Greeter.visibleto alwaystruealters the previous primary-output-based visibility logic; if anything else in the file or surrounding code depends on Greeter only being visible on the primary output (for layout or animations), consider scoping this change specifically to the MouseArea/input interception instead of the entireFocusScope. - LockView and ShutdownView are now wrapped in
Loaders and instantiated viaComponents; double-check that there are no remaining references to the oldlockView/shutdownViewIDs elsewhere in this QML or related files, and if needed expose properties or signals through the loaders so those interactions still work.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Changing `Greeter.visible` to always `true` alters the previous primary-output-based visibility logic; if anything else in the file or surrounding code depends on Greeter only being visible on the primary output (for layout or animations), consider scoping this change specifically to the MouseArea/input interception instead of the entire `FocusScope`.
- LockView and ShutdownView are now wrapped in `Loader`s and instantiated via `Component`s; double-check that there are no remaining references to the old `lockView`/`shutdownView` IDs elsewhere in this QML or related files, and if needed expose properties or signals through the loaders so those interactions still work.
## Individual Comments
### Comment 1
<location path="src/plugins/lockscreen/qml/Greeter.qml" line_range="122-125" />
<code_context>
- LockView {
- id: lockView
+ Loader {
+ id: lockViewLoader
anchors.fill: parent
- onAnimationPlayFinished: function () {
- if (lockView.state === LoginAnimation.Hide) {
- root.animationPlayFinished()
+ active: primaryOutputName === "" || primaryOutputName === output.name
+ sourceComponent: lockViewComponent
+ }
</code_context>
<issue_to_address>
**suggestion:** The repeated primary-output condition could be factored into a dedicated property for readability and maintainability.
This condition (`primaryOutputName === "" || primaryOutputName === output.name`) is now duplicated across multiple loaders. Consider extracting it into a reusable property, e.g. `property bool isPrimaryOutput: primaryOutputName === "" || primaryOutputName === output.name`, to improve readability and make future changes easier.
Suggested implementation:
```
visible: true
// Reusable flag indicating whether this output is the primary one
property bool isPrimaryOutput: primaryOutputName === "" || primaryOutputName === output.name
x: outputItem.x
y: outputItem.y
enabled: true
}
```
```
Loader {
id: lockViewLoader
anchors.fill: parent
active: isPrimaryOutput
```
The same repeated condition (`primaryOutputName === "" || primaryOutputName === output.name`) should be replaced with `isPrimaryOutput` in any other `Loader` (or related components) within this output context to fully apply the refactoring and keep the logic centralized.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
TAG Bot New tag: 0.8.13 |
…e locked Set Greeter visible to true so it covers all outputs with MouseArea, preventing interaction with windows on secondary screens. LockView and ShutdownView are wrapped in a Loader with the original primary‑output condition, keeping them instantiated only on the primary display. 将 Greeter 的 visible 设为 true 使其覆盖所有输出并拦截输入; LockView 和 ShutdownView 通过 Loader 仅在主屏加载,修复多屏锁屏 时副屏窗口仍可操作的问题。 Log: 修复多屏锁屏副屏可操作的问题 PMS: BUG-367461 Influence: 锁屏状态下副屏不再有可交互的锁屏界面,输入被正确拦截。
Groveer
approved these changes
Jun 29, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: glyvut, Groveer 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.
…e locked
Set Greeter visible to true so it covers all outputs with MouseArea, preventing interaction with windows on secondary screens. LockView and ShutdownView are wrapped in a Loader with the original primary‑output condition, keeping them instantiated only on the primary display.
将 Greeter 的 visible 设为 true 使其覆盖所有输出并拦截输入;
LockView 和 ShutdownView 通过 Loader 仅在主屏加载,修复多屏锁屏
时副屏窗口仍可操作的问题。
Log: 修复多屏锁屏副屏可操作的问题
PMS: BUG-367461
Influence: 锁屏状态下副屏不再有可交互的锁屏界面,输入被正确拦截。
Summary by Sourcery
Ensure the lockscreen greeter covers all outputs while only rendering lock and shutdown views on the primary display to fix multi‑monitor interaction issues.
Bug Fixes:
Enhancements: