Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: window is closed after switching mode #343

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

zsien
Copy link
Member

@zsien zsien commented Jul 5, 2024

  • 仅当 visible 为 true 时调用 requestActivate,调用时机不对导致 active 状态异常
  • 切换模式后增加超时,1s 内 active 状态变更,只处理最后一次

Issues: linuxdeepin/developer-center#9567

@zsien zsien requested a review from a team July 5, 2024 08:13
Copy link
Contributor

@kegechen kegechen left a comment

Choose a reason for hiding this comment

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

+1

kegechen
kegechen previously approved these changes Jul 5, 2024
* 仅当 visible 为 true 时调用 requestActivate,
  调用时机不对导致 active 状态异常
* 切换模式后增加超时,1s 内 active 状态变更,只处理最后一次

Issues: linuxdeepin/developer-center#9567
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • LauncherController::LauncherController构造函数中,连接了m_timertimeout信号到一个匿名槽,但没有检查m_timer是否已经被正确初始化。
  • LauncherController::Toggle方法中,停止了定时器,但没有重新启动它,可能导致隐藏操作无法执行。
  • LauncherController::setCurrentFrame方法中,m_pendingHide被设置为false,但没有在文档中说明这个变量的用途。
  • LauncherController::hideWithTimer方法中,如果定时器已经启动,会立即停止定时器,而不是等待触发。
  • LauncherController::cancelHide方法被添加,但没有在代码中看到相关的调用,可能是不必要的代码。
  • Main.qml中,onVisibleChanged事件的处理逻辑可能存在问题,因为它会立即调用updateWindowVisibilityAndPosition,但在某些情况下(如窗口最小化时),这可能不是期望的行为。
  • Main.qml中,处理onActiveChanged事件的逻辑可能存在问题,因为它会立即调用LauncherController.hideWithTimer,但在某些情况下(如窗口激活时),这可能不是期望的行为。

是否建议立即修改:

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: yixinshark, zsien

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

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

@zsien zsien merged commit eb867d5 into linuxdeepin:master Jul 8, 2024
9 of 10 checks passed
@zsien zsien deleted the zs/fix/switchmodeclose branch July 8, 2024 10:26
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.

4 participants