Skip to content

fix: When opening an app and delaying an operation, the mouse does not load transition animations.#275

Closed
wjyrich wants to merge 1 commit intolinuxdeepin:masterfrom
wjyrich:fix-bug-275547
Closed

fix: When opening an app and delaying an operation, the mouse does not load transition animations.#275
wjyrich wants to merge 1 commit intolinuxdeepin:masterfrom
wjyrich:fix-bug-275547

Conversation

@wjyrich
Copy link
Contributor

@wjyrich wjyrich commented Jul 2, 2025

目前AM给出了StartuoNotify的属性,需要窗管那边进行处理此属性,从而处理鼠标指针。

pms:BUG-275547

Summary by Sourcery

Expose and implement a new StartupNotify property in ApplicationService to allow the window manager to handle startup notification flags (enabling proper pointer animations).

New Features:

  • Add startupNotify() getter and Q_PROPERTY with notification signal to ApplicationService
  • Implement startupNotifyChanged emission when resetting an application entry
  • Update D-Bus interface XML to include the StartupNotify boolean property

…t load transition animations.

目前AM给出了StartuoNotify的属性,需要窗管那边进行处理此属性,从而处理鼠标指针。

pms:BUG-275547
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wjyrich

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

@sourcery-ai
Copy link

sourcery-ai bot commented Jul 2, 2025

Reviewer's Guide

This PR introduces a new StartupNotify flag in the ApplicationService, exposing it over D-Bus and wiring up change notifications so that the window manager can handle cursor animations on startup delays.

Class diagram for ApplicationService with StartupNotify property

classDiagram
    class ApplicationService {
        +bool startupNotify() const noexcept
        +void startupNotifyChanged()
        <<Q_PROPERTY>> bool StartupNotify
    }
Loading

File-Level Changes

Change Details Files
Expose StartupNotify in ApplicationService
  • Add Q_PROPERTY declaration for StartupNotify
  • Declare startupNotify() getter and startupNotifyChanged signal
  • Implement startupNotify() to read DesktopFile entry value
  • Emit startupNotifyChanged in resetEntry
src/dbus/applicationservice.h
src/dbus/applicationservice.cpp
Update D-Bus interface to include StartupNotify
  • Add StartupNotify property element with boolean type
  • Provide descriptive annotation for the new property
api/dbus/org.desktopspec.ApplicationManager1.Application.xml

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

@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. 新增属性描述的准确性

    • org.desktopspec.ApplicationManager1.Application.xml文件中新增的StartupNotify属性描述为"Indicate this application should launch with startup notification or not.",这个描述是准确的,但建议确认是否所有相关文档和用户界面都已经更新以反映这一变化。
  2. 新增属性的访问控制

    • 新增的StartupNotify属性被设置为read访问权限,这意味着客户端只能读取该属性的值,而不能修改。如果需要客户端能够修改这个属性,应该将其访问权限设置为readwrite
  3. 新增属性的默认值

    • ApplicationService::startupNotify方法中,如果StartupNotify属性不存在,则返回false。这是一个合理的默认值,但建议在文档中明确说明这一点,以便其他开发者理解这一行为。
  4. 信号发射的命名一致性

    • ApplicationService::resetEntry方法中,新增了emit startupNotifyChanged();,这符合Qt的信号命名约定。但是,建议检查所有相关的信号命名是否一致,并且是否遵循了Qt的命名规范。
  5. 代码注释和文档

    • 新增的StartupNotify属性和对应的方法没有注释说明其用途和实现细节。建议添加适当的注释,以便其他开发者理解这一新功能的实现。
  6. 代码风格一致性

    • 检查整个代码库,确保新增的代码风格与现有代码风格一致。例如,变量命名、代码缩进等。
  7. 安全性

    • 检查ApplicationService::startupNotify方法中是否有对findEntryValue返回值的空指针检查,以防止潜在的空指针解引用。
  8. 性能

    • ApplicationService::startupNotify方法中调用了findEntryValue,如果这个方法在性能敏感的路径中被频繁调用,建议考虑缓存结果以提高性能。
  9. 测试

    • 为新增的StartupNotify属性和方法添加单元测试,以确保其行为符合预期,并且不会引入新的bug。
  10. 代码审查

    • 进行代码审查时,确保所有团队成员都理解新增功能的目的和实现细节,并且同意这一变更。

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @wjyrich - 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.

@deepin-bot
Copy link

deepin-bot bot commented Jul 3, 2025

TAG Bot

New tag: 1.2.32
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #281

@deepin-bot
Copy link

deepin-bot bot commented Jul 10, 2025

TAG Bot

New tag: 1.2.33
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #283

@wjyrich wjyrich closed this Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants