deepin-kwin icon indicating copy to clipboard operation
deepin-kwin copied to clipboard

feat: make dock can use systemResize

Open tsic404 opened this issue 1 year ago • 3 comments

X11 clients can use _NET_WM_MOVERESIZE to let the WM take charge of the resize operation, so as to have a smooth resize effect. However, the implementation in Kwin prohibits this behavior of special window by default. This will cause the dock to be unable to call this mechanism, resulting in a relatively poor drag and drop experience.

So in this PR, I released the _NET_WM_MOVERESIZE request for dock type windows. At the same time, when the window type is Dock, moveResize is set to a Unrestricted state to remove the influence of the exclusive area.

log: as title

tsic404 avatar Dec 26 '24 05:12 tsic404

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tsic404

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

deepin-ci-robot avatar Dec 26 '24 05:12 deepin-ci-robot

deepin pr auto review

代码审查意见:

  1. 代码修改中,X11Window::NETMoveResize 函数中新增了对 isDock() 的检查,这是一个好的实践,因为它增加了代码的灵活性和可配置性。但是,需要确保 isDock() 函数的实现是正确的,并且与窗口的预期行为一致。

  2. X11Window::NETMoveResize 函数中,setUnrestrictedInteractiveMoveResize 的调用被修改为 setUnrestrictedInteractiveMoveResize(isDock());。这个修改可能会影响窗口的交互行为,需要确认这个改动是否符合预期的功能需求。

  3. Window::handleInteractiveMoveResize 函数中,对 isResizable() 的检查被修改为 (!isDock() && !isResizable()),这可能会改变窗口的交互行为。需要确保这个改动是经过充分测试的,并且不会引入新的问题。

  4. Window::updateCursor 函数中,isResizable() 的检查被修改为 (!isDock() && !isResizable()),这同样可能会影响窗口的交互行为。需要确认这个改动是经过充分测试的,并且不会引入新的问题。

  5. 代码中没有发现明显的语法或逻辑错误,但是建议在修改后的代码中添加注释,说明为什么需要添加 isDock() 的检查,以及这个改动对窗口行为的影响。

  6. 代码风格上,建议保持代码的一致性,例如在条件判断中,如果条件复杂,可以考虑使用括号来提高代码的可读性。

  7. 性能方面,代码修改没有明显的性能问题,但是建议在修改后的代码中添加性能测试,确保改动不会引入性能瓶颈。

  8. 安全方面,代码修改没有引入新的安全漏洞,但是建议定期进行安全审计,确保代码的安全性。

总体来说,代码修改是合理的,但是需要确保这些改动经过充分的测试,并且与预期的功能需求一致。同时,建议在代码中添加适当的注释,以便其他开发者理解这些改动的目的和影响。

deepin-ci-robot avatar Dec 26 '24 05:12 deepin-ci-robot

@tsic404: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
deepin-auto-translation ccabb1190a9c0bc399b5e2d1fcb253d4d7ddfc5c link true /test deepin-auto-translation

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

deepin-ci-robot avatar May 29 '25 05:05 deepin-ci-robot