Skip to content

Conversation

@18202781743
Copy link
Contributor

  1. Added touch drag support for QQuickWindow with proper grabber state
    tracking
  2. Implemented multi-screen aware touch drag handling with position
    validation
  3. Added new Utility::updateMousePointForWindowMove overload for custom
    positions
  4. Improved window boundary checks using scene coordinates
  5. Added debug logging for window drag operations

The changes enable proper touch-based window dragging for QML-based
applications while maintaining existing mouse drag functionality. The
implementation tracks touch grabber states to determine if QML items
have handled the touch events, and only initiates window dragging when
no QML items have claimed the touch points. The multi-screen support
ensures correct behavior across different display configurations.

feat: 增强QML窗口的触摸拖拽支持

  1. 为QQuickWindow添加触摸拖拽支持,并正确跟踪grabber状态
  2. 实现多屏幕感知的触摸拖拽处理,包含位置验证
  3. 新增Utility::updateMousePointForWindowMove重载方法支持自定义位置
  4. 使用场景坐标改进窗口边界检查
  5. 添加窗口拖拽操作的调试日志

这些变更使得基于QML的应用程序能够正确支持触摸拖拽窗口,同时保留现有的鼠
标拖拽功能。实现通过跟踪触摸grabber状态来判断QML组件是否处理了触摸事件,
仅当没有QML组件处理时才启动窗口拖拽。多屏幕支持确保在不同显示配置下的正
确行为。

pms: BUG-309157

@18202781743 18202781743 requested review from BLumia and mhduiy June 4, 2025 08:02
deepin-ci-robot added a commit to linuxdeepin/qt6platform-plugins that referenced this pull request Jun 4, 2025
Synchronize source files from linuxdeepin/qt5platform-plugins.

Source-pull-request: linuxdeepin/qt5platform-plugins#286
mhduiy
mhduiy previously approved these changes Jun 4, 2025
1. Added touch drag support for QQuickWindow with proper grabber state
tracking
2. Implemented multi-screen aware touch drag handling with position
validation
3. Added new Utility::updateMousePointForWindowMove overload for custom
positions
4. Improved window boundary checks using scene coordinates
5. Added debug logging for window drag operations

The changes enable proper touch-based window dragging for QML-based
applications while maintaining existing mouse drag functionality. The
implementation tracks touch grabber states to determine if QML items
have handled the touch events, and only initiates window dragging when
no QML items have claimed the touch points. The multi-screen support
ensures correct behavior across different display configurations.

feat: 增强QML窗口的触摸拖拽支持

1. 为QQuickWindow添加触摸拖拽支持,并正确跟踪grabber状态
2. 实现多屏幕感知的触摸拖拽处理,包含位置验证
3. 新增Utility::updateMousePointForWindowMove重载方法支持自定义位置
4. 使用场景坐标改进窗口边界检查
5. 添加窗口拖拽操作的调试日志

这些变更使得基于QML的应用程序能够正确支持触摸拖拽窗口,同时保留现有的鼠
标拖拽功能。实现通过跟踪触摸grabber状态来判断QML组件是否处理了触摸事件,
仅当没有QML组件处理时才启动窗口拖拽。多屏幕支持确保在不同显示配置下的正
确行为。

pms: BUG-309157
@18202781743 18202781743 requested a review from mhduiy June 4, 2025 08:38
deepin-ci-robot added a commit to linuxdeepin/qt6platform-plugins that referenced this pull request Jun 4, 2025
Synchronize source files from linuxdeepin/qt5platform-plugins.

Source-pull-request: linuxdeepin/qt5platform-plugins#286
@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

关键摘要:

  • DNoTitlebarWindowHelper构造函数中新增了m_isQuickWindow成员变量,用于判断窗口是否为QML窗口,但未提供相应的注释说明其用途。
  • windowEvent函数中新增了对触摸事件的特殊处理,特别是对Qt6版本的处理,但未对Qt5版本进行相应的处理。
  • handleTouchDragForQML函数中,对触摸事件的处理逻辑进行了扩展,增加了对多屏幕坐标的处理和窗口边界检查,但未对边界检查的准确性进行验证。
  • Utility类中新增了updateMousePointForWindowMove的重载函数,用于支持多屏幕的坐标更新,但未提供对旧版本函数的兼容性处理。

是否建议立即修改:

  • 应该为新增的成员变量m_isQuickWindow添加注释,说明其用途和作用。
  • 应该对Qt5版本的事件处理进行相应的修改,以保持代码的一致性和兼容性。
  • 应该对新增的边界检查逻辑进行验证,确保其在多屏幕环境下的准确性。
  • 应该考虑对旧版本的updateMousePointForWindowMove函数进行兼容性处理,以避免潜在的兼容性问题。

@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, mhduiy

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

@18202781743 18202781743 merged commit 2d9d16f into linuxdeepin:master Jun 4, 2025
16 of 20 checks passed
18202781743 pushed a commit to linuxdeepin/qt6platform-plugins that referenced this pull request Jun 4, 2025
Synchronize source files from linuxdeepin/qt5platform-plugins.

Source-pull-request: linuxdeepin/qt5platform-plugins#286
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