Skip to content

Commit 5892655

Browse files
wjyrichdeepin-bot[bot]
authored andcommitted
fix: stop submenu loader delay timer when menu becomes visible
Fixed an issue where the submenu loader delay timer was not properly stopped when the menu becomes visible. This could cause timing issues where the timer might interfere with submenu loading behavior. The fix ensures that when the menu becomes visible, the delay timer is immediately stopped before activating the submenu loader, preventing any potential race conditions or unexpected behavior. Influence: 1. Test opening and closing system tray menus to ensure smooth submenu transitions 2. Verify that submenus load correctly without delays when menu becomes visible 3. Check that timer functionality still works correctly when menu is hidden 4. Test with various system tray items that have submenus to ensure consistent behavior fix: 当菜单可见时停止子菜单加载器延迟计时器 修复了当菜单变为可见时子菜单加载器延迟计时器未正确停止的问题。这可能导致 计时问题,计时器可能干扰子菜单加载行为。此修复确保当菜单变为可见时,在激 活子菜单加载器之前立即停止延迟计时器,防止任何潜在的竞争条件或意外行为。 Influence: 1. 测试打开和关闭系统托盘菜单,确保子菜单转换流畅 2. 验证当菜单变为可见时,子菜单能正确加载且无延迟 3. 检查当菜单隐藏时,计时器功能仍能正常工作 4. 测试具有子菜单的各种系统托盘项,确保行为一致 PMS: BUG-290637
1 parent 7fdfaef commit 5892655

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

panels/dock/tray/SurfacePopup.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Item {
7575

7676
onMenuVisibleChanged: {
7777
if (menuVisible) {
78+
subMenuLoaderDelayTimer.stop()
7879
subMenuLoader.active = true
7980
} else {
8081
subMenuLoaderDelayTimer.start()

panels/dock/tray/TrayItemSurfacePopup.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Item {
5757

5858
onMenuVisibleChanged: {
5959
if (menuVisible) {
60+
subMenuLoaderDelayTimer.stop()
6061
subMenuLoader.active = true
6162
} else {
6263
subMenuLoaderDelayTimer.start()

0 commit comments

Comments
 (0)