Skip to content

wip: treeland autotests mcp need window tree#874

Open
zorowk wants to merge 2 commits into
linuxdeepin:masterfrom
zorowk:windowtree2
Open

wip: treeland autotests mcp need window tree#874
zorowk wants to merge 2 commits into
linuxdeepin:masterfrom
zorowk:windowtree2

Conversation

@zorowk
Copy link
Copy Markdown
Contributor

@zorowk zorowk commented May 19, 2026

No description provided.

Copy link
Copy Markdown

@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 @zorowk, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zorowk

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

@LFRon
Copy link
Copy Markdown
Contributor

LFRon commented May 19, 2026

标题是不是多打了个'e' (

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

中文:该 PR 引入基于 Qt RemoteObjects 的“窗口树/光标信息”远程数据源(用于获取当前模式、各层/工作区窗口信息等),并新增用户配置 inputAccelProfile 以通过 libinput 应用指针加速曲线;同时为若干容器补充 objectName 以便窗口树识别与调试定位。

English: This PR adds a Qt RemoteObjects-based “window tree / cursor info” remote source (exposing current mode, per-layer/workspace windows, etc.), introduces a new user config inputAccelProfile to apply libinput pointer acceleration profiles, and assigns objectNames to several containers to make the window tree/debugging easier.

Changes:

  • 新增 TreelandRemoteSource + .rep 接口,通过 RemoteObjects 导出窗口树与光标位置 / Add TreelandRemoteSource + .rep interface to expose window tree & cursor via RemoteObjects.
  • 将输入设备初始化从 initTouchPad 扩展为 initDevice,并接入 inputAccelProfile 配置 / Expand input init from initTouchPad to initDevice and wire in inputAccelProfile.
  • 为 Shell 各层容器与锁屏对象补充 objectName / Set objectNames for shell layer containers and lock screen.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/seat/helper.h 增加 TreelandRemoteSource 成员声明 / Add member for remote source.
src/seat/helper.cpp 创建 TreelandRemoteSource,并切换到 InputDevice::initDevice / Instantiate remote source and switch to initDevice.
src/modules/resource/treelandremotesource.h 新增窗口树远程数据源头文件 / New window tree remote source header.
src/modules/resource/treelandremotesource.cpp 实现 RemoteObjects host、采集窗口/层/工作区信息与光标同步 / Implement host, collection logic, cursor updates.
src/modules/resource/treeland_windowtree.rep 新增 RemoteObjects .rep 协议定义 / New RemoteObjects .rep schema.
src/input/inputdevice.h 将 API 改为 initDevice 并新增连接管理字段 / Rename API and add connection tracking member.
src/input/inputdevice.cpp 实现 initDevice 并接入 accel profile 配置 / Implement initDevice and accel profile wiring.
src/core/shellhandler.cpp 为各层容器设置 objectName / Set objectNames for layer containers.
src/core/layersurfacecontainer.h 为容器类补充 Q_OBJECT / Add Q_OBJECT macros.
src/CMakeLists.txt 引入 Qt RemoteObjects/Network 并生成 repc 源码 / Add Qt modules and repc sources.
misc/dconfig/org.deepin.dde.treeland.user.json 新增 inputAccelProfile 配置项 / Add inputAccelProfile setting.

Comment thread src/modules/resource/treelandremotesource.cpp
Comment thread src/modules/resource/treelandremotesource.cpp Outdated
Comment thread src/input/inputdevice.cpp Outdated
Comment thread src/input/inputdevice.cpp
Comment thread src/input/inputdevice.h Outdated
@zorowk zorowk changed the title wip: treeland autotests mcp need window treee wip: treeland autotests mcp need window tree May 19, 2026
@zorowk
Copy link
Copy Markdown
Contributor Author

zorowk commented May 19, 2026

标题是不是多打了个'e' (

done

Comment thread src/modules/resource/treelandwindowtree.rep
Comment thread src/modules/resource/treelandremotesource.cpp Outdated
Comment thread src/core/shellhandler.cpp Outdated
@zorowk zorowk force-pushed the windowtree2 branch 6 times, most recently from a040804 to 043eb67 Compare May 20, 2026 05:54
Comment thread src/input/inputdevice.cpp
Comment thread src/modules/resource/treelandremotesource.cpp Outdated
Comment thread src/modules/resource/treelandremotesource.cpp Outdated
Comment thread src/modules/resource/treelandremotesource.cpp Outdated
Comment thread src/modules/resource/treelandremotesource.cpp
Copy link
Copy Markdown

@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.

New security issues found

Comment thread tools/treeland-windowtree/setup.py
Comment thread tools/treeland-windowtree/setup.py
@zorowk zorowk force-pushed the windowtree2 branch 3 times, most recently from 88c9471 to 74cd473 Compare May 22, 2026 03:22
@deepin-bot
Copy link
Copy Markdown

deepin-bot Bot commented May 22, 2026

TAG Bot

New tag: 0.8.7
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #886

@zorowk zorowk requested a review from zccrs May 26, 2026 08:41
zorowk added 2 commits May 27, 2026 10:40
content:

    Define a hierarchical .rep interface representing Layer -> Workspace -> Window topology.

    Implement captureTree slot to provide real-time snapshots on demand.

    Map SurfaceListModel indices to Z-order to ensure physical stacking accuracy.

    Remove high-frequency signal listeners and timers to optimize compositor performance.

Log:
Introduced a structured window tree provider using Qt Remote Objects.
Unlike the previous polling mechanism, this implementation only serializes
window metadata when explicitly requested, significantly reducing CPU overhead
while preserving the full logical hierarchy of the desktop.

Influence:
Provides a lightweight and semantically rich interface for the AI assistant to inspect
the current desktop layout without impacting system fluidity.
Add libinput accel speed/profile dconfig options and wire them into input
device setup. Apply settings on device hotplug and config changes, and
reuse a helper to update all current devices.

Log: apply libinput accel config
Influence: pointer, touchpad, virtual input
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.

5 participants