Skip to content

Conversation

@wjyrich
Copy link
Contributor

@wjyrich wjyrich commented Nov 26, 2025

  1. Modified window insertion logic to group all windows of the same application together
  2. When adding new windows, they are now inserted after the last existing window of the same application
  3. Maintains docked application positions while converting them to running windows
  4. Improved data change signaling to include window title updates
  5. Enhanced index adjustment logic for better row position tracking

Log: Application windows are now grouped together in the task manager

Influence:

  1. Test opening multiple windows of the same application
  2. Verify that windows of the same app appear consecutively in the task manager
  3. Test window grouping when applications are both docked and running
  4. Verify window title updates are properly reflected
  5. Test window insertion and removal scenarios
  6. Check that docked application positions are preserved when windows open

feat: 在任务管理器中分组显示应用程序窗口

  1. 修改窗口插入逻辑,将同一应用程序的所有窗口分组显示
  2. 添加新窗口时,现在会插入到同一应用程序的最后一个现有窗口之后
  3. 在将停靠应用程序转换为运行窗口时保持其位置
  4. 改进数据变更信号,包含窗口标题更新
  5. 增强索引调整逻辑以更好地跟踪行位置 处理任务栏窗口拆分需求时,需要将同一个应用窗口显示处理在一起。

Log: 应用程序窗口现在在任务管理器中分组显示

Influence:

  1. 测试打开同一应用程序的多个窗口
  2. 验证同一应用程序的窗口在任务管理器中是否连续显示
  3. 测试应用程序同时处于停靠和运行状态时的窗口分组
  4. 验证窗口标题更新是否正确反映
  5. 测试窗口插入和移除场景
  6. 检查窗口打开时停靠应用程序位置是否保持

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.

Sorry @wjyrich, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@BLumia BLumia requested a review from tsic404 November 26, 2025 06:34
@wjyrich wjyrich force-pushed the add-mergeSameAppWithWindow branch from 0c9ef47 to a302244 Compare November 27, 2025 03:40
1. Modified window insertion logic to group all windows of the same
application together
2. When adding new windows, they are now inserted after the last
existing window of the same application
3. Maintains docked application positions while converting them to
running windows
4. Improved data change signaling to include window title updates
5. Enhanced index adjustment logic for better row position tracking

Log: Application windows are now grouped together in the task manager

Influence:
1. Test opening multiple windows of the same application
2. Verify that windows of the same app appear consecutively in the task
manager
3. Test window grouping when applications are both docked and running
4. Verify window title updates are properly reflected
5. Test window insertion and removal scenarios
6. Check that docked application positions are preserved when windows
open

feat: 在任务管理器中分组显示应用程序窗口

1. 修改窗口插入逻辑,将同一应用程序的所有窗口分组显示
2. 添加新窗口时,现在会插入到同一应用程序的最后一个现有窗口之后
3. 在将停靠应用程序转换为运行窗口时保持其位置
4. 改进数据变更信号,包含窗口标题更新
5. 增强索引调整逻辑以更好地跟踪行位置
处理任务栏窗口拆分需求时,需要将同一个应用窗口显示处理在一起。

Log: 应用程序窗口现在在任务管理器中分组显示

Influence:
1. 测试打开同一应用程序的多个窗口
2. 验证同一应用程序的窗口在任务管理器中是否连续显示
3. 测试应用程序同时处于停靠和运行状态时的窗口分组
4. 验证窗口标题更新是否正确反映
5. 测试窗口插入和移除场景
6. 检查窗口打开时停靠应用程序位置是否保持
@wjyrich wjyrich force-pushed the add-mergeSameAppWithWindow branch from a302244 to 88cd13d Compare November 27, 2025 07:58
@deepin-ci-robot
Copy link

deepin pr auto review

我来分析一下这两个文件的代码变更:

  1. DockCombineModel.cpp 的修改:
- res = data.value(0, "");
+ res = data.join("-");

改进意见:

  • 逻辑改进:原来只取第一个元素,现在改为用"-"连接所有元素,这样可以提供更完整的信息
  • 代码质量:使用join()方法更简洁,避免了可能的空字符串问题
  • 建议:考虑添加一个常量来定义分隔符"-",便于后续维护
  1. DockGlobalElementModel.cpp 的修改:
    这段代码重构了窗口管理逻辑,主要改进包括:

改进意见:

  1. 代码质量:
  • 代码结构更清晰,将同一应用的窗口组织在一起
  • 添加了详细的注释,提高了可读性
  • 使用了更合理的变量命名(如firstIt、lastIt)
  1. 逻辑改进:
  • 优化了窗口插入策略,确保同一应用的窗口保持连续
  • 处理了空desktopId的情况,增加了健壮性
  • 添加了WinTitleRole到dataChanged信号中,提供更完整的更新信息
  1. 性能考虑:
  • 使用find_if和while循环的组合来定位插入位置,效率较高
  • 避免了不必要的重复遍历
  1. 安全性:
  • 增加了对desktopId为空的检查
  • 使用了边界检查(lastIt + 1 != m_data.end())

建议改进:

  1. 可以考虑将窗口管理的策略抽象成单独的函数,提高代码复用性
  2. 可以添加日志记录,便于调试和问题追踪
  3. 考虑使用常量定义role集合,避免硬编码
  4. 可以添加单元测试来验证窗口管理的各种场景

总体来说,这次修改提高了代码的可维护性和健壮性,使窗口管理逻辑更加清晰和可靠。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tsic404, 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

@wjyrich wjyrich merged commit f601a66 into linuxdeepin:master Nov 27, 2025
9 of 11 checks passed
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.

3 participants