Skip to content

fix: hide window instead of quitting when closing control center#3307

Draft
deepin-wm wants to merge 1 commit into
linuxdeepin:masterfrom
deepin-wm:fix/hide-window-instead-of-quit
Draft

fix: hide window instead of quitting when closing control center#3307
deepin-wm wants to merge 1 commit into
linuxdeepin:masterfrom
deepin-wm:fix/hide-window-instead-of-quit

Conversation

@deepin-wm

Copy link
Copy Markdown

When the control center window is closed, hide it instead of calling Qt.quit() so the D-Bus service stays registered. This allows the update notification's "View" button to reopen the control center.

Also fix DBusControlCenterGrandSearchService's auto-exit timer to not kill the process after the window has been shown at least once, using a m_hasEverShown flag set via QWindow::visibleChanged signal.

PMS: BUG-253878

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

Sorry @deepin-wm, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepin-wm

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

@deepin-wm deepin-wm force-pushed the fix/hide-window-instead-of-quit branch 2 times, most recently from 035695b to 499db2a Compare June 18, 2026 14:28
1. Change DccWindow.qml onClosing from Qt.quit() to hide window
2. Set close.accepted = false to prevent default close behavior
3. Add m_hasEverShown flag to DBusControlCenterGrandSearchService
4. Guard auto-exit timer with !m_hasEverShown condition
5. Connect QWindow::visibleChanged signal to set m_hasEverShown

Log: Hide control center window on close instead of
  quitting, so D-Bus service stays registered and
  update notification View button can reopen it

Influence:
1. Test closing control center window and reopening via D-Bus Show
2. Test update notification View button reopening control center
3. Test GrandSearch auto-exit timer still works before window shown
4. Test window hide/show cycle preserves D-Bus service availability

fix: 关闭控制中心时隐藏窗口而非退出进程

1. 将 DccWindow.qml 的 onClosing 从 Qt.quit() 改为隐藏窗口
2. 设置 close.accepted = false 阻止默认关闭行为
3. 为 DBusControlCenterGrandSearchService 添加 m_hasEverShown 标志
4. 使用 !m_hasEverShown 条件守护自动退出定时器
5. 连接 QWindow::visibleChanged 信号以设置 m_hasEverShown

Log: 关闭控制中心时隐藏窗口而非退出,保持
  D-Bus 服务注册,使更新通知的查看按钮能重新打开控制中心

Influence:
1. 测试关闭控制中心窗口后通过 D-Bus Show 重新打开
2. 测试更新通知查看按钮重新打开控制中心
3. 测试窗口显示前 GrandSearch 自动退出定时器仍正常工作
4. 测试窗口隐藏/显示循环保持 D-Bus 服务可用性

PMS: BUG-253878
@deepin-wm deepin-wm force-pushed the fix/hide-window-instead-of-quit branch from 499db2a to 3dc9add Compare June 18, 2026 14:32
@deepin-bot

deepin-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

TAG Bot

New tag: 6.1.96
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #3314

@deepin-bot

deepin-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

TAG Bot

New tag: 6.1.97
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #3322

@deepin-bot

deepin-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

TAG Bot

New tag: 6.1.98
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #3328

@deepin-bot

deepin-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

TAG Bot

New tag: 6.1.99
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #3348

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