perf(core): cache cursor output and emit it on change - #1453
Merged
Merged
Conversation
Add cursorOutputChanged(Output*) to RootSurfaceContainer and cache the output under the cursor. The signal fires only when the output actually changes, so LockScreen repositions its global login view on an output switch instead of on every cursor motion. 为 RootSurfaceContainer 新增 cursorOutputChanged(Output*) 信号,并缓存 光标所在输出;仅在输出真正变化时发出。锁屏登录界面因此只在切换输出时 重新排布,而不再随每次鼠标移动触发。 Log: 新增光标输出变化信号并缓存,避免每次移动重排布 PMS: TASK-390751 Influence: cursorOutput() 改为读取缓存;锁屏登录界面仅在切换输出时重新排布。
Reviewer's GuideCaches the cursor’s current output in RootSurfaceContainer and emits cursorOutputChanged only when it changes, allowing LockScreen to reposition the global login view only when the cursor crosses outputs while preserving refreshes after output-layout changes. Sequence diagram for cached cursor output changessequenceDiagram
participant Cursor as WCursor
participant Root as RootSurfaceContainer
participant Lock as LockScreen
Cursor->>Root: positionChanged
Root->>Root: updateCursorOutput()
alt output changed
Root-->>Lock: cursorOutputChanged(Output*)
Lock->>Lock: repositionLoginView()
else same output
Root-->>Root: no signal emitted
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
wineee
approved these changes
Sep 30, 2026
zccrs
approved these changes
Sep 30, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: gugullll, wineee, 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 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.
Add cursorOutputChanged(Output*) to RootSurfaceContainer and cache the output under the cursor. The signal fires only when the output actually changes, so LockScreen repositions its global login view on an output switch instead of on every cursor motion.
为 RootSurfaceContainer 新增 cursorOutputChanged(Output*) 信号,并缓存 光标所在输出;仅在输出真正变化时发出。锁屏登录界面因此只在切换输出时重新排布,而不再随每次鼠标移动触发。
Log: 新增光标输出变化信号并缓存,避免每次移动重排布
PMS: TASK-390751
Influence: cursorOutput() 改为读取缓存;锁屏登录界面仅在切换输出时重新排布。
Summary by Sourcery
Cache the cursor’s current output and use output-change notifications to avoid unnecessary lock-screen layout updates.
New Features:
Enhancements: