Skip to content

fix: fix the issue where multiple applications remain selected after …#774

Open
MyLeeJiEun wants to merge 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:fork-from-master-0612-fix-issue-364529
Open

fix: fix the issue where multiple applications remain selected after …#774
MyLeeJiEun wants to merge 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:fork-from-master-0612-fix-issue-364529

Conversation

@MyLeeJiEun

@MyLeeJiEun MyLeeJiEun commented Jun 12, 2026

Copy link
Copy Markdown

…long-pressing the launcher

  1. Add interactionPressed and interactionHovered properties to ItemBackground
  2. Use HoverHandler for explicit mouse hover detection in list views
  3. Replace direct ColorSelector state check with controlled interaction properties
  4. Apply consistent interaction state binding in AppListView and FreeSortListView

Log: Fix multiple apps incorrectly staying in selected state after consecutive long presses

fix: 修复启动器长按多个应用后多个应用保持选中状态

  1. 为 ItemBackground 添加 interactionPressed 和 interactionHovered 属性
  2. 使用 HoverHandler 显式检测鼠标悬停状态
  3. 用可控的交互属性替代直接检查 ColorSelector 状态
  4. 在 AppListView 和 FreeSortListView 中统一绑定交互状态

Log: 修复启动器长按多个应用后多个应用错误保持选中状态的问题
PMS: BUG-364529

Summary by Sourcery

Ensure launcher app items update selection state correctly on pointer interactions in windowed views.

Bug Fixes:

  • Fix multiple launcher applications remaining selected after consecutive long presses in windowed app and free-sort lists.

Enhancements:

  • Add explicit hover handlers and interaction state properties to list item backgrounds to centralize pressed/hovered state handling.

@deepin-ci-robot

Copy link
Copy Markdown

Hi @MyLeeJiEun. Thanks for your PR. 😃

@deepin-ci-robot

Copy link
Copy Markdown

Hi @MyLeeJiEun. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@sourcery-ai

sourcery-ai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Refactors item interaction handling in launcher list views by introducing explicit pressed/hovered interaction properties on ItemBackground and wiring them to mouse and hover handlers, fixing a bug where multiple apps remained visually selected after consecutive long-presses.

Sequence diagram for launcher item press and hover interaction handling

sequenceDiagram
    actor User
    participant MouseArea
    participant HoverHandler
    participant ItemBackground

    User->>MouseArea: press
    MouseArea->>MouseArea: mouseArea.pressed = true
    MouseArea->>ItemBackground: interactionPressed = mouseArea.pressed
    ItemBackground->>ItemBackground: isActive()

    User->>MouseArea: release
    MouseArea->>MouseArea: mouseArea.pressed = false
    MouseArea->>ItemBackground: interactionPressed = mouseArea.pressed
    ItemBackground->>ItemBackground: isActive()

    User->>HoverHandler: move_pointer
    HoverHandler->>HoverHandler: itemHoverHandler.hovered = true
    HoverHandler->>ItemBackground: interactionHovered = itemHoverHandler.hovered
    ItemBackground->>ItemBackground: isActive()
Loading

File-Level Changes

Change Details Files
Introduce explicit interactionPressed and interactionHovered properties on ItemBackground and use them instead of direct ColorSelector state checks.
  • Added interactionPressed and interactionHovered boolean properties on the ItemBackground control.
  • Initialized these properties with defaults based on ColorSelector.controlState to preserve behavior when not explicitly bound.
  • Replaced inline ColorSelector.controlState checks in the isItemHighlighted logic with the new interaction properties to centralize interaction state control.
qml/windowed/ItemBackground.qml
Wire mouse press and hover state from AppListView items into ItemBackground via the new interaction properties.
  • Added a HoverHandler to each app item to explicitly track mouse hover state for mouse devices.
  • Bound ItemBackground.interactionPressed to the item MouseArea.pressed property.
  • Bound ItemBackground.interactionHovered to the HoverHandler.hovered property to drive hover visuals.
qml/windowed/AppListView.qml
Apply the same explicit interaction wiring in FreeSortListView to keep interaction handling consistent across list types.
  • Added a HoverHandler to free-sort list items to detect mouse hover state.
  • Bound ItemBackground.interactionPressed to the item MouseArea.pressed property in the free-sort view.
  • Bound ItemBackground.interactionHovered to the HoverHandler.hovered property, aligning behavior with AppListView.
qml/windowed/FreeSortListView.qml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

…long-pressing the launcher

1. Add interactionPressed and interactionHovered properties to ItemBackground
2. Use HoverHandler for explicit mouse hover detection in list views
3. Replace direct ColorSelector state check with controlled interaction properties
4. Apply consistent interaction state binding in AppListView and FreeSortListView

Log: Fix multiple apps incorrectly staying in selected state after consecutive long presses

fix: 修复启动器长按多个应用后多个应用保持选中状态

1. 为 ItemBackground 添加 interactionPressed 和 interactionHovered 属性
2. 使用 HoverHandler 显式检测鼠标悬停状态
3. 用可控的交互属性替代直接检查 ColorSelector 状态
4. 在 AppListView 和 FreeSortListView 中统一绑定交互状态

Log: 修复启动器长按多个应用后多个应用错误保持选中状态的问题
PMS: BUG-364529
@MyLeeJiEun MyLeeJiEun force-pushed the fork-from-master-0612-fix-issue-364529 branch from 2892544 to 2b26132 Compare June 12, 2026 11:08
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mhduiy, MyLeeJiEun

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants