revert: remove automatic focus setting on launcher visibility#733
Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom Mar 12, 2026
Merged
revert: remove automatic focus setting on launcher visibility#733deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
Conversation
This reverts commit a8dd424. Remove the forceActiveFocus() call on search edit when launcher becomes visible, restoring the previous behavior where focus management was handled differently. 回退自动设置启动器可见时的焦点功能。移除启动器可见时对搜索框调用 forceActiveFocus() 的代码,恢复之前的焦点管理行为。 PMS: BUG-301743
Reviewer's guide (collapsed on small PRs)Reviewer's GuideReverts the behavior that automatically focused the launcher search field when the launcher became visible, while keeping the cleanup behavior that runs when the launcher hides. Sequence diagram for launcher visibility and search focus handlingsequenceDiagram
actor User
participant LauncherController
participant WindowedFrame
participant WindowedSearchEdit as Windowed_searchEdit
participant FullscreenFrame
participant FullscreenSearchEdit as Fullscreen_searchEdit
User->>LauncherController: set visible true
LauncherController-->>WindowedFrame: onVisibleChanged(true)
WindowedFrame->>WindowedFrame: check LauncherController.visible
WindowedFrame-->>WindowedSearchEdit: no action (focus not changed)
LauncherController-->>FullscreenFrame: onVisibleChanged(true)
FullscreenFrame->>FullscreenFrame: check LauncherController.visible
FullscreenFrame-->>FullscreenSearchEdit: no action (focus not changed)
User->>LauncherController: set visible false
LauncherController-->>WindowedFrame: onVisibleChanged(false)
WindowedFrame->>WindowedFrame: if not visible perform cleanup
WindowedFrame->>WindowedSearchEdit: set text ""
WindowedFrame->>WindowedSearchEdit: clear focus
LauncherController-->>FullscreenFrame: onVisibleChanged(false)
FullscreenFrame->>FullscreenFrame: if not visible perform cleanup
FullscreenFrame->>FullscreenSearchEdit: set text ""
FullscreenFrame->>FullscreenSearchEdit: clear focus and selection state
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 left some high level feedback:
- The
onVisibleChangedhandlers inWindowedFrame.qmlandFullscreenFrame.qmlnow share nearly identical visibility-check and cleanup logic; consider extracting this into a shared helper or component to avoid divergence in future tweaks. - Given the early-return pattern for
LauncherController.visible, it may be clearer to invert the condition toif (!LauncherController.visible) { ... }and drop thereturn, which makes the intent (“run this block only when hidden”) more explicit.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `onVisibleChanged` handlers in `WindowedFrame.qml` and `FullscreenFrame.qml` now share nearly identical visibility-check and cleanup logic; consider extracting this into a shared helper or component to avoid divergence in future tweaks.
- Given the early-return pattern for `LauncherController.visible`, it may be clearer to invert the condition to `if (!LauncherController.visible) { ... }` and drop the `return`, which makes the intent (“run this block only when hidden”) more explicit.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
18202781743
approved these changes
Mar 12, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, Ivy233 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 |
Contributor
Author
|
/merge |
|
This pr cannot be merged! (status: behind) |
Contributor
Author
|
/forcemerge |
|
This pr force merged! (status: behind) |
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.
This reverts commit a8dd424. Remove the forceActiveFocus() call on search edit when launcher becomes visible, restoring the previous behavior where focus management was handled differently.
回退自动设置启动器可见时的焦点功能。移除启动器可见时对搜索框调用
forceActiveFocus() 的代码,恢复之前的焦点管理行为。
PMS: BUG-301743
Summary by Sourcery
Bug Fixes: