feat: add window maximize and unmaximize methods#154
feat: add window maximize and unmaximize methods#154fly602 merged 1 commit intolinuxdeepin:masterfrom
Conversation
Added MaximizeActiveWindow and UnMaximizeActiveWindow methods to the window manager D-Bus interface. These new methods provide separate controls for maximizing and restoring windows, complementing the existing toggle functionality. The implementation includes D-Bus interface definitions in the XML file, Go language bindings in auto.go, and corresponding mock implementations for testing in auto_mock.go. This change enables more precise window management control by allowing applications to specifically maximize or restore windows without relying solely on the toggle behavior. The separate methods provide better programmatic control over window states. Log: Added window maximize and unmaximize controls to window manager Influence: 1. Test MaximizeActiveWindow method to verify it maximizes the active window 2. Test UnMaximizeActiveWindow method to verify it restores maximized windows 3. Verify both methods work correctly with different window types 4. Test interaction with existing ToggleActiveWindowMaximize method 5. Verify D-Bus interface stability and error handling 6. Test mock implementations in unit tests feat: 添加窗口最大化和取消最大化方法 在窗口管理器 D-Bus 接口中添加了 MaximizeActiveWindow 和 UnMaximizeActiveWindow 方法。这些新方法提供了单独的最大化和恢复窗口控 制,补充了现有的切换功能。实现包括 XML 文件中的 D-Bus 接口定义、auto.go 中的 Go 语言绑定以及 auto_mock.go 中对应的模拟实现用于测试。 此更改通过允许应用程序专门最大化或恢复窗口而不依赖切换行为,实现了更精确 的窗口管理控制。单独的方法提供了对窗口状态更好的程序化控制。 Log: 新增窗口最大化和取消最大化控制功能 PMS: BUG-302527 Influence: 1. 测试 MaximizeActiveWindow 方法验证其能最大化活动窗口 2. 测试 UnMaximizeActiveWindow 方法验证其能恢复最大化窗口 3. 验证两种方法在不同窗口类型下正常工作 4. 测试与现有 ToggleActiveWindowMaximize 方法的交互 5. 验证 D-Bus 接口稳定性和错误处理 6. 在单元测试中测试模拟实现
deepin pr auto review这段代码主要是在 Deepin 窗口管理器(DDE WM)的 DBus 接口中添加了两个新方法: 以下是对这段代码的审查意见,分为语法逻辑、代码质量、代码性能和代码安全四个方面: 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全
总结与改进建议总体而言,这段代码质量很高,完全符合 DBus 接口定义和 Go 语言的最佳实践。 改进建议:
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fly602, mhduiy The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Added MaximizeActiveWindow and UnMaximizeActiveWindow methods to the window manager D-Bus interface. These new methods provide separate controls for maximizing and restoring windows, complementing the existing toggle functionality. The implementation includes D-Bus interface definitions in the XML file, Go language bindings in auto.go, and corresponding mock implementations for testing in auto_mock.go.
This change enables more precise window management control by allowing applications to specifically maximize or restore windows without relying solely on the toggle behavior. The separate methods provide better programmatic control over window states.
Log: Added window maximize and unmaximize controls to window manager
Influence:
feat: 添加窗口最大化和取消最大化方法
在窗口管理器 D-Bus 接口中添加了 MaximizeActiveWindow 和
UnMaximizeActiveWindow 方法。这些新方法提供了单独的最大化和恢复窗口控
制,补充了现有的切换功能。实现包括 XML 文件中的 D-Bus 接口定义、auto.go
中的 Go 语言绑定以及 auto_mock.go 中对应的模拟实现用于测试。
此更改通过允许应用程序专门最大化或恢复窗口而不依赖切换行为,实现了更精确
的窗口管理控制。单独的方法提供了对窗口状态更好的程序化控制。
Log: 新增窗口最大化和取消最大化控制功能
PMS: BUG-302527
Influence: