Repository navigation
Conversation
1. Drop QFileSystemWatcher from SessionModel: no forward declaration, no private member, no directoryChanged connection, and setSessionDirs() no longer adds or removes watch paths. 2. Make reload() Q_INVOKABLE and call it from SessionList's onAboutToShow before currentIndex is assigned, so every time the session popup opens the *.desktop files are scanned on the spot. 3. Keep the first reload() in setSessionDirs(): the greeter needs the model populated before the popup has ever been opened, for the session name on the action button and for GreeterProxy::login(). feat(greeter): 会话列表在弹窗打开时当场获取 1. SessionModel 移除 QFileSystemWatcher:去掉前向声明、成员变量和 directoryChanged 连接,setSessionDirs() 不再 addPaths/removePaths。 2. reload() 提升为 Q_INVOKABLE,并在 SessionList 的 onAboutToShow 中赋值 currentIndex 之前调用,每次打开会话列表弹窗都当场扫描 *.desktop。 3. setSessionDirs() 保留首次 reload():弹窗从未打开时,按钮上的会话名和 GreeterProxy::login() 都依赖模型已填充。 Log: greeter 的会话列表不再依赖文件系统监视,每次打开列表都重新扫描 session 目录,新装或卸载的会话包立即反映到列表里。 Influence: 1. 在 greeter 界面打开会话列表,确认列表与 /usr/share/wayland-sessions、 /usr/share/xsessions 的内容一致。 2. 保持 greeter 常驻,安装或删除一个 session 包,再打开会话列表,确认列表 已更新,且已选中的会话在文件仍存在时保持选中。 3. 不打开会话列表直接登录,确认按钮上的会话名与登录取到的 session 路径正常。 Multica Issue: WM-947 PMS: TASK-390751
1. Add WindowTreeRemote::requestNoAuth(), which widens the debug socket to 0666 and its directory to 0711 for a 30-minute window. Only a caller that already got through the sealed socket can ask, and in a release build that is root alone. 2. Bind the global service's socket in /run/treeland-debug, not in its runtime directory: while the window is open that directory is 0711, Qt rejects an XDG_RUNTIME_DIR it does not find 0700 and moves new sessions' wayland sockets to $TMPDIR. That one directory is also the only path the window may widen, compared canonically. 3. Widen the directory once and leave it 0711 (traverse, not list) until the process exits. Instances share the directory -- the numeric socket suffix exists for that -- so narrowing it when one window closes would cut off a peer whose own window is still open, and a "does anyone else still need it" check across processes cannot be made race free. Only the socket goes back to 0000; systemd recreates the directory as 0700 on the next start. 4. Close the socket by rebuilding the host, so peers that connected during the window are dropped: chmod 0000 only refuses new connects. 5. Push the window out on every later remote call, cursor included, and close it on an idle half hour and on teardown. 6. Refuse the request when the socket is not in Treeland's own debug directory, so a session instance (TREELAND_RUN_MODE=user) keeps requiring root. 7. Export it as `treeland-debug no-auth`, HTTP GET /api/no-auth, MCP `no-auth` and a WebSocket command. 8. Guard reachableWithoutRoot() like its only caller, which a Debug build (-Werror) otherwise rejects as unused. Log: A treeland-debug run as root can open the debug channel to every local user for a self-closing 30-minute window; default behaviour is unchanged and a session instance never opens. Access is gated by the socket modes alone: the debug directory is widened to 0711 on the first window and stays that way until the process exits, while every socket is sealed at 0000 unless its own window is open. The global debug socket moves from /run/treeland to /run/treeland-debug (systemd RuntimeDirectory=); a new client still probes /run/treeland, while an old client needs --url or TREELAND_DEBUG_SOCKET against a new compositor. Influence: 1. Without `no-auth`, a non-root treeland-debug run still needs root. 2. Run `sudo treeland-debug no-auth`, then confirm a non-root user can run treeland-debug without a password prompt. 3. Leave it idle for 30 minutes and verify the socket is root-only again (the directory stays 0711, which normalizes on restart), and that a client connected during the window lost its connection. 4. Run in session mode (TREELAND_RUN_MODE=user) and confirm `no-auth` is refused and root is still required. 5. With the window open, verify $XDG_RUNTIME_DIR stays 0700 and that a new session's wayland socket is not created under $TMPDIR. fix: 免鉴权目录放宽一次后保持到进程退出 1. 新增 WindowTreeRemote::requestNoAuth(),把 debug socket 放宽到 0666、其目录放宽到 0711,窗口 30 分钟。只有已经穿过封死 socket 的调用者能发,Release 构建下那就是 root。 2. 全局服务的 socket 改绑 /run/treeland-debug,不再绑自己的 runtime 目录:窗口期间它是 0711,Qt 发现 XDG_RUNTIME_DIR 不是 0700 会改用 $TMPDIR,新会话的 wayland socket 就落到 /tmp。窗口 只允许放宽这一个目录,比较前先 canonical 化。 3. 目录只在第一次开窗时放宽一次,之后保持 0711(可穿越、不可列 目录)直到进程退出。多个实例会共用这个目录(socket 名字带数 字后缀就是为此),某个实例收窗时把目录改回 0700 会切断另一个 窗口还开着的实例,而"还有没有别人要用"的跨进程判断本身做不成 无竞态。回收的只有 socket(回 0000);systemd 下次启动会把目录 重建为 0700。 4. 关闭窗口时重建 host,窗口期内建立的连接随之断开——chmod 0000 只能拦住新的连接。 5. 之后每次远程调用(含 cursor)都会续期,空闲半小时或析构时收回。 6. 目录不是 treeland 自己的调试目录时直接拒绝,会话实例 (TREELAND_RUN_MODE=user)仍需 root。 7. 对外入口:`treeland-debug no-auth`、HTTP GET /api/no-auth、MCP `no-auth`、WebSocket 命令。 8. reachableWithoutRoot() 的定义与唯一调用点放进同一个 #ifndef,否则 Debug 构建(-Werror)报未使用函数。 Log: 以 root 运行一次 treeland-debug 即可让任意本机用户免鉴权接入 调试通道,30 分钟无调用自动关闭,关闭时断开窗口期内的连接;默认 行为不变,会话实例不会打开。门禁完全由 socket 权限位承担:调试目 录在第一次开窗时放宽到 0711 并保持到进程退出,而每个 socket 不在 自己的窗口期内都是 0000。全局调试 socket 位置由 /run/treeland 改为 /run/treeland-debug(依赖 systemd 的 RuntimeDirectory=);新客户端 仍会探测 /run/treeland,旧客户端对接新合成器需要 --url 或 TREELAND_DEBUG_SOCKET。 Influence: 1. 未执行 `no-auth` 时,非 root 运行 treeland-debug 仍需 root。 2. 执行 `sudo treeland-debug no-auth` 后,非 root 用户运行 treeland-debug 无需密码即可连接。 3. 闲置 30 分钟确认 socket 已收回 root-only(目录保持 0711,重启后 恢复正常),且窗口期内建立的连接已被断开。 4. 会话模式(TREELAND_RUN_MODE=user)下执行 `no-auth`,应被拒绝且 仍需 root。 5. 窗口打开期间确认 $XDG_RUNTIME_DIR 保持 0700,新会话的 wayland socket 不会建到 $TMPDIR。 Multica Issue: WM-939
1. Add GraphicsPlatform (src/utils/graphicsplatform.h/.cpp): identify the GPU vendor family, chip class and model from the QRhi driver info. 2. Create it once where rendering starts, in WaylandServer::initializeRenderWindow(), and expose it through WaylandServer::graphicsPlatform() so every consumer shares one result instead of probing the driver again. 3. Classify NVIDIA cores by model number instead of always reporting GF100, so Kepler/Maxwell/Pascal/Turing/Ampere/Ada/Blackwell are distinguished. 4. Drop OutputManager::isNvidiaCardPresent() and use GraphicsPlatform::isNvidia() for the software cursor decision. 5. Log the detected graphics platform once, at info level, next to the render window initialization. Log: treeland now reports the GPU it runs on (vendor, chip class, model) instead of only matching "NVIDIA" in the device name. Influence: 1. On any NVIDIA card the software cursor is still forced, as before. 2. On Radeon/Intel/Adreno/Mali/VideoCore and software rendering nothing changes. 3. Startup log gains one "Graphics platform:" line carrying vendor, chip class and model. feat(utils): 新增显卡信息探测 1. 新增 GraphicsPlatform(src/utils/graphicsplatform.h/.cpp):根据 QRhi 的 驱动信息识别显卡厂商、核心分类与型号。 2. 对象在渲染初始化处创建一次(WaylandServer::initializeRenderWindow()), 通过 WaylandServer::graphicsPlatform() 对外访问,各使用方共用同一份 结果,不再各自重复探测。 3. NVIDIA 核心分类改为按型号数字判定,不再把所有现代显卡都报成 GF100, 可区分 Kepler/Maxwell/Pascal/Turing/Ampere/Ada/Blackwell。 4. 删除 OutputManager::isNvidiaCardPresent(),软光标判断改用 GraphicsPlatform::isNvidia()。 5. 渲染窗口初始化时就绪后,以 info 级别打印一次探测结果。 Log: treeland 现在能上报运行的显卡(厂商、核心分类、型号),不再只是匹配 设备名里的 "NVIDIA"。 Influence: 1. NVIDIA 显卡上仍强制使用软件光标,行为不变。 2. Radeon/Intel/Adreno/Mali/VideoCore 与软件渲染下行为不变。 3. 启动日志新增一行 "Graphics platform:",包含厂商、核心分类与型号。 PMS: TASK-390751 Multica Issue: WM-949
treeland-debug could inspect windows and input events, but nothing reported the compositor's shortcut registry: which keys/gestures are bound, when a client binds a new one, or when one fires. That made "the shortcut does nothing" impossible to diagnose without reading the treeland.shortcut log. Compositor side: - `ShortcutController::bindings()` exposes the current registry, and new `shortcutRegistered`/`shortcutUnregistered` signals report changes (registerKey/registerSwipeGesture/registerHoldGesture/unregisterShortcut). - `WindowTreeRemote` gains `getShortcuts()` returning `ShortcutInfo` PODs (name, type, key sequence, flags, action, fingers, direction). - `TreelandRemoteSource` feeds registrations and `actionTriggered` into the debug event stream as types 6/7/8 while a client is polling `getEvents()`, using the same lazy capture as input events (trigger detail carries the keyboard-focused window as target). - `WaylandServer::shortcutController()` exposes the registry. Client side: - `treeland-debug shortcuts` lists them as a table, or `--json`. - `GET /api/shortcuts`, the `shortcuts` MCP tool and the WebSocket one-shot command mirror it, like every other inspection command. Docs: tools/treeland-debug/README.md, README.md and the treeland-debug skill.
Review follow-up on the shortcut monitoring: - P1: swipe gestures report only actionFinished(), never actionTriggered(), so their triggers never reached the debug stream. actionFinished(true) is now mapped to the same type 8 event; key and hold still arrive through actionTriggered(), so nothing is counted twice. - P2: ShortcutController::clear() (session switch, acquire()) and the key upsert rename path dropped bindings silently, leaving the stream claiming stale bindings were still registered. Both now emit shortcutUnregistered(); clear() skips the signal while destructing. - P3: m_shortcutController is a QPointer, so a controller destroyed before the source cannot be dereferenced in stopEventCapture(). - P4: gesture triggers (swipe/hold) report target 0 — no keyboard focus applies — and the trigger detail now carries press|release|repeat. - Shortcut names come from Wayland clients: control characters are replaced before they reach the CLI table or the event stream. - `treeland-debug events` prints the event type, matching the `type` field names used in the docs.
Two findings from the AI review of PR linuxdeepin#1563: - `shortcutDetail()` filled gesture details with chained `arg()` calls, so a client-provided name containing a placeholder was substituted again by the next call: a binding named `swipe-%2` was reported as `swipe-3`. Fill every placeholder in one `arg()` pass (finger count stringified), which leaves the name untouched. - The type-8 target was read from the seat after `actionTriggered()` had been emitted, and `ShortcutRunner::onActionTrigger` is connected first, so a workspace or task switch reported the destination window (or 0). The controller now samples the focused window through a debug-only provider before emitting, and the remote source reports that value.
…rovider Follow-up on the Sourcery review of PR linuxdeepin#1563: - `sanitizedName()` replaced only C0 and DEL, so a shortcut name carrying C1 controls (0x80-0x9f) still reached the CLI table and the event stream on terminals that interpret them as escape introducers. C1 is replaced now. - The debug trigger-target provider is stored in the shortcut controller, which can outlive the source when remoteDebug is toggled. Capture a QPointer so a provider left installed returns 0 instead of calling into a destroyed source. (`~TreelandRemoteSource` already clears it through `stopEventCapture()`; this makes the invariant local.)
1. WindowInfo gains inputRegion and opaqueRegion as QRegion, taken straight
from the wlr_surface pixman regions via WTools::fromPixmanRegion; both are
in surface-local coordinates.
2. The windows/clients tables print both regions per window (first 8 boxes,
the rest summarised as "(+N more)"); tree/windows/clients --json,
/api/windows|clients and the MCP tools get the full box lists.
3. WindowInfo is a WindowTreeRemote POD and repc serialises a POD by field
order with no version negotiation, so treeland-debug and treeland must be
built from the same revision and the same Qt.
4. treeland-debug now depends on Qt6::Gui, where QRegion lives.
5. The field docs follow wlroots: regions are clipped to the surface on every
commit, so an unset (NULL) input region, defined by the protocol as
infinite, reads back as one full-surface box; an empty opaqueRegion is the
protocol default, not a claim that the window is transparent.
Log: treeland-debug now prints each window's input region and opaque
region, both in the human-readable tables and in the JSON output.
Influence:
1. treeland-debug windows/clients: every window has one extra
"input-region=... opaque-region=..." line; ordinary windows report one
box covering the surface, clients that only accept input on part of
the window report several.
2. treeland-debug --json windows (and /api/windows, /api/clients,
MCP window tools): inputRegion/opaqueRegion are arrays of
{x,y,width,height}. An unset input region reads back as the whole
surface, an empty one only appears when the client committed no input
area; an empty opaqueRegion means no opaque area was declared.
3. Build treeland and treeland-debug from the same revision and the same
Qt: a debug client from another revision mis-parses every window after
the first, and QRegion's stream format is Qt's.
4. Packagers: treeland-debug now links libQt6Gui, so minimal images need it.
5. Regression: window geometry, state, dock/launcher hit zones and the
client/tree/top output are unchanged apart from the new line.
feat(treeland-debug): 打印窗口的输入区域和不透明区域
1. WindowInfo 新增 inputRegion 与 opaqueRegion,类型为 QRegion,直接由
WTools::fromPixmanRegion 从 wlr_surface 的 pixman region 取得,坐标都是
surface 局部坐标。
2. windows/clients 表格为每个窗口多打印一行两个 region(最多 8 个 box,
其余汇总为 "(+N more)");tree/windows/clients 的 --json、
/api/windows|clients 与 MCP 工具输出完整 box 列表。
3. WindowInfo 是 WindowTreeRemote 的 POD,repc 按字段顺序序列化且没有
版本协商,因此 treeland-debug 与 treeland 必须同版本、同 Qt 构建。
4. treeland-debug 新增 Qt6::Gui 依赖(QRegion 在其中)。
5. 字段文档按 wlroots 的实际行为说明:每次 commit 都把 region 与 surface
求交,所以协议定义为"无穷大"的未设置(NULL)输入区域读回来是覆盖整面
的一个 box;opaqueRegion 为空是协议默认值,不代表窗口透明。
Log: treeland-debug 现在会打印每个窗口的输入区域与不透明区域,人读表格
和 JSON 输出都包含。
Influence:
1. treeland-debug windows/clients:每个窗口多一行
"input-region=... opaque-region=...";普通窗口是覆盖整个 surface 的
一个 box,只在一部分区域接收输入的客户端会显示多个 box。
2. treeland-debug --json windows(以及 /api/windows、/api/clients、MCP
窗口工具):inputRegion/opaqueRegion 为 {x,y,width,height} 数组。未设置
输入区域读回来是整面;只有客户端提交了空区域才为空;opaqueRegion 为空
表示没有声明不透明区域。
3. treeland 与 treeland-debug 必须同版本、同 Qt 构建:版本不一致的客户端
会把第一个之后的窗口字段全部解析错位,QRegion 的流格式属于 Qt 侧。
4. 打包:treeland-debug 现在依赖 libQt6Gui,最小化镜像需带上。
5. 回归项:除新增一行外,窗口几何、状态、Dock/启动器命中区以及
clients/tree/top 的输出均无变化。
PMS: TASK-390751
Multica Issue: WM-932
1. RootSurfaceContainer::removeOutput() tore down the per-output surface containers before moving the primary output away. Layer surfaces created without an explicit output are re-homed to primaryOutput(), so they looked up the container of the output being destroyed and hit Q_ASSERT(container) in addSurfaceToContainer(). 2. Move the primary away first (movePrimaryOutputAwayFrom()), and do the same in the inconsistent root/layout fallback of removeFromRootContainer(). The primary becomes null when the last output goes, so those surfaces are closed instead of being re-homed to a dead output, while windows of a removed screen still migrate to the primary that is left. 3. Keep the primary restore intent rule (only losing the last output records it), finish a move/resize on that output before its containers go, and cover removal in tests/protocols/wlr-layer-shell-unstable-v1. Log: Fix abort on primary screen unplug or VT switch Influence: 1. Dual screen: unplug the primary screen, its layer surfaces and windows move onto the remaining screen and stay visible. 2. Single screen: switch VT back and forth, treeland does not abort and the panel and wallpaper are rebuilt. 3. Single screen: hot-plug the only screen, the primary is restored from the primaryOutputId configuration. fix(core): 修复主屏移除时的 abort 1. RootSurfaceContainer::removeOutput() 在把主屏移走之前就拆掉了各 output 的 surface 容器。未指定 output 的 layer surface 会被迁移到 primaryOutput(),此时查到的是正在销毁的 output,addSurfaceToContainer() 的 Q_ASSERT(container) 失败。 2. 改为先切主屏(movePrimaryOutputAwayFrom()), removeFromRootContainer() 的一致性兜底分支同样处理。被移除的是最后 一个 output 时主屏置为 nullptr,这类 surface 走 closed() 正常关闭而不是 被迁移到已销毁的 output;被移除屏上的窗口仍迁移到剩余的主屏。 3. 主屏恢复 intent 规则保持原样(只有失去最后一个 output 才记录), 移除前先结束该屏上的 move/resize,并在 tests/protocols/wlr-layer-shell-unstable-v1 中补回归用例。 Log: 修复主屏拔线或 VT 切换时 treeland abort 的问题 Influence: 1. 双屏拔掉主屏:layer surface 与窗口迁移到另一屏并保持可见。 2. 单屏 VT 切换往返:treeland 不崩溃,切回后面板、壁纸自动重建。 3. 单屏热插拔:主屏按 primaryOutputId 配置恢复。 Multica Issue: WM-943
1. remoteDebug now defaults to false: a compositor running inside a user session must not hand out window contents and input injection unasked. Toggling it still takes effect immediately, no restart needed. 2. A debug build ignores the switch and always publishes its own `-dev` socket: that instance is the one being developed, and a stale `false` left by an earlier session only looks like "debug is broken". 3. A debug build also opens that channel to every local user for good: the `-dev` socket is 0666 and Treeland's own global directory is widened to 0711 at startup, so a deb-installed debug compositor running as its own user accepts any local `treeland-debug` without a polkit prompt. Only a directory owned by that user and writable by nobody else is widened ($TREELAND_DEBUG_DIR is easy to point at /tmp, whose sticky bit a chmod would drop); a session instance's socket stays in its 0700 runtime dir. 4. Add `treeland-debug debug [on|off|status]`, the only command that needs no debug socket. It finds the compositor's uid through /proc, escalates via pkexec when the switch belongs to another user, and reads the value back because dde-dconfig reports refusals as text while still exiting 0. 5. A release build that finds no socket at all now reports the off switch and how to turn it on, instead of prompting for a password that cannot help. 6. Document the new default, the debug-build exception and the command, and correct the old note that DConfig rejects root: root may name the target user with `-u`. Log: A release build publishes no debug socket until `treeland-debug debug on`; a debug build publishes its `-dev` socket and accepts any local user without a prompt. Influence: 1. On a fresh release install `treeland-debug tree` says the switch is off and how to turn it on, without a polkit password prompt. 2. `treeland-debug debug on|off` publishes/drops the socket immediately; `treeland-debug debug` prints the current state; a bad argument exits 1. 3. In global mode (compositor as dde) `debug on` escalates through polkit and writes the dde user's key; `--no-escalate` only reports the requirement. 4. A debug build publishes its `-dev` socket with remoteDebug=false, and any local user connects without a prompt; a release build still answers root alone, and a debug build whose debug directory is shared (1777) leaves it untouched and warns. feat: 调试开关默认关闭,Debug 构建对本机开放 1. remoteDebug 默认改为关闭:跑在用户会话里的合成器不应默认交出窗口内容 与输入注入能力。开/关仍然即时生效,无需重启。 2. Debug 构建不看这个开关,始终发布自己的 `-dev` socket:那个实例本身就是 被开发的对象,而上一轮会话留下的 `false` 只会看起来像"调试坏了"。 3. Debug 构建还把通道对整个本机永久放开:`-dev` socket 是 0666,启动时把 Treeland 自己的全局目录开到 0711,所以 deb 安装、以它自己用户运行的 debug 合成器,任何本机用户都能用 `treeland-debug` 直接连、不弹 polkit。 只有属主就是自己、且没被别人写的目录才会被放宽 (`TREELAND_DEBUG_DIR` 很容易指到 /tmp,chmod 会把它的 sticky 位抹掉); 会话实例的 socket 留在 0700 的 runtime 目录里,不放宽。 4. 新增 `treeland-debug debug [on|off|status]`,它是唯一不需要调试 socket 的 命令。命令从 /proc 找出合成器的 uid,开关属于其他用户时通过 pkexec 提权, 并且以回读值为准——dde-dconfig 失败时也返回 0,只把错误打在输出里。 5. Release 构建在完全没有 socket 时,现在会直接说明开关是关的以及怎么打开, 而不是弹一次帮不上忙的密码框。 6. 更新文档:新的默认值、Debug 构建的例外、这条命令,并修正旧注释中 "DConfig 连 root 也拒绝"的说法——root 可以用 `-u` 指定目标用户。 Log: Release 构建在执行 `treeland-debug debug on` 之前不发布调试 socket; Debug 构建始终发布 `-dev` socket,并允许本机任何用户免认证连接。 Influence: 1. 全新安装的 Release 上执行 `treeland-debug tree`:提示开关为关并给出打开 方式,不弹 polkit 认证。 2. `treeland-debug debug on|off` 立即发布/收回 socket;`treeland-debug debug` 打印当前状态;非法参数返回 1。 3. global 模式(合成器以 dde 运行)下 `debug on` 通过 polkit 提权并写入 dde 用户的键;`--no-escalate` 只报告需要提权而不弹认证。 4. Debug 构建在开关为 false 时照样发布 `-dev` socket,别的本机用户可直接 连接、不弹认证;Release 构建仍只有 root 能连;debug 构建的调试目录若是 共享目录(1777),目录权限保持不变并打印告警。 Multica Issue: WM-955
Replace the list-view delegates with slot instances that own their own rectangle. A slot keeps moving while the window it shows is swapped, so an app switch cross-fades in place instead of rebuilding the strip. A slot also owns the size its content is drawn at: every layer inside it, current or outgoing, is drawn at that one size and clipped by the slot box. A switch animates the size to the new content's natural size, so the slot box moving never stretches the picture. Old pictures move to layers of their own and fade out independently, the way the tooltip layers do. A removed window no longer slides to the tail of the strip: a slot closes into the one taking its place, or into the one before it, and the closing slot freezes its picture so it survives the window being destroyed. The picture keeps its own size, is clipped by the shrinking slot, and fades out in 100ms while the slot itself keeps the normal duration. The strip stays pinned while the frame shrinks, so a close never shifts the whole layer. An empty window list closes the popover instead of leaving an empty box. New slots fade in from transparent; opening the preview unfolds from a tenth of its settled size. Geometry and slot fades use 350ms OutExpo; only the closing picture uses 100ms OutCubic. 用槽实例重做预览条:每个槽自己拥有矩形,换 App 时槽继续移动,内容原地 交叉淡化,不再重建整条预览。 槽还自己持有一个内容绘制尺寸:当前画面与旧画面都按这一个尺寸居中绘制, 超出槽框的部分裁掉。切换时该尺寸从当前值动画到新内容的自然尺寸,槽框 怎么变都不会拉伸画面。 旧画面各自留在一层上独立淡出,和 tooltip 图层的做法一致。 移除窗口时不再把槽滑到预览条末尾:槽收进接替它位置的槽或前一个槽; 正在关的槽冻结一帧画面,窗口先被销毁也不会变空。画面保持自身尺寸,被 缩小的槽框裁切,并在 100ms 内淡出,槽本身仍走正常时长。外框收缩时预览条 保持定住,整层不会跳位。窗口列表为空时直接关闭弹窗,不再留一个空框。 新槽从全透明淡入;直接打开预览时外框从最终大小的 10% 展开。几何与槽的 淡入淡出统一用 350ms OutExpo,只有关闭时的画面用 100ms OutCubic。 Log: 重做 dock 预览的槽位与内容动画 PMS: TASK-396711 Influence: 1. 换 App 时复用槽实例,内容原地交叉淡化;槽框变化只裁切不拉伸 2. 旧画面独立淡出;关窗时槽收进接替位,画面 100ms 先消失,槽仍 350ms 收起 3. 外框收缩时预览条保持定住,整层不跳位 4. 重排后标题行跟随高亮槽;窗口清空后弹窗自动关闭 5. 仅影响 dock 预览与 tooltip 弹窗
Guard the xwayland code in treeland and waylib with DISABLE_XWAYLAND so a compositor built without xwayland support neither creates an XWayland instance nor carries the X11-only logic: the xwayland-shell global filter, the per-session XWayland instance, the WLR_XWAYLAND helper setup, the DISPLAY/XAUTHORITY activation environment, the X11 desktop properties, xsettings/atoms, the IM candidate panel xprop path, the X11 decoration and stacking handling, and the xwindow-control protocol. Build side: treeland gets its own DISABLE_XWAYLAND option (forwarded to waylib), the treeland-xwayland helper target and its systemd socket/service exist only when xwayland is enabled, and waylib really stops compiling wxwayland/wxwaylandsurface/wxwaylandsurfaceitem instead of adding them unconditionally. 用 DISABLE_XWAYLAND 包裹 treeland 与 waylib 中的 xwayland 代码:关闭 xwayland 支持构建出的合成器不再创建 XWayland 实例,也不再执行任何 X11 专属 逻辑,包括 xwayland-shell 全局过滤器、每会话 XWayland 实例、WLR_XWAYLAND helper 设置、DISPLAY/XAUTHORITY 激活环境、X11 桌面属性、xsettings 与 atom、 输入法候选框 xprop 路径、X11 装饰与堆叠处理以及 xwindow-control 协议。 构建侧:treeland 增加自己的 DISABLE_XWAYLAND 选项(传递给 waylib), treeland-xwayland helper 及其 systemd socket/service 仅在启用 xwayland 时 存在,waylib 也不再无条件编译 wxwayland/wxwaylandsurface/wxwaylandsurfaceitem。 Log: 新增 DISABLE_XWAYLAND 构建选项;关闭后不再编译和运行 xwayland 逻辑 PMS: TASK-390751 Influence: 默认构建行为不变;仅 -DDISABLE_XWAYLAND=ON 时移除 X11 应用支持
Treeland unconditionally forced software cursors on X11 outputs, leaving the last cursor image visible after the pointer left the nested window. Honor forceSoftwareCursor instead of overriding it for X11, allowing the host cursor to handle pointer visibility by default. Log: fix stale cursor image when leaving a nested X11 window PMS: TASK-390751 Influence: cursor rendering on nested X11 outputs
1. A disabled output is filtered out by updateSurfaceOutputs(), so a surface can be left with an empty output list and an empty framePacingOutput when the screen is turned off by DPMS. wlr_output enabling again is not a geometry change, and nothing in the tree consumed WOutput::enabledChanged besides the XWayland desktop properties, so nothing recomputed the outputs: scheduleFrameIfNeeded() and the renderEnd frame-done gate both stayed closed and the window kept showing its last committed frame forever. 2. RootSurfaceContainer::addOutput() now also connects WOutput::enabledChanged and recomputes the outputs of every non-layer surface once the output is really enabled (the flag is applied before the commit event is emitted). The surfaces are re-entered, the frame pacing output comes back and the client paints again. 3. The handler is a member slot that reads the sender, not a lambda capturing Output: OutputManager recreates the Output object on mirror/extension switches while the same WOutput lives on, so a captured pointer outlives its object. Qt::UniqueConnection then keeps exactly one handler per WOutput however often the output is registered again, and the connection needs no teardown in removeOutput(). 4. This also covers the second shape of the same failure: an output that is re-added calls addOutput() before its first enable commit, so the recompute used to see an empty set as well. Enabling fires the same path right after. 5. Disabling an output still clears the lists as before; only the way back is added, so the DPMS-off path keeps its current behaviour. Log: Fix Wayland windows freezing after the screen was turned off and on Influence: 1. Lock the session, let the screen really turn off, unlock: a native Wayland window that was moved/resized while the screen was off no longer stays frozen; it repaints as soon as the output is enabled. 2. A window that left all outputs keeps its clear (not downscaled) content and resumes with frame callbacks delivered. 3. Windows that were not touched survive the round trip unchanged, and single- and multi-output setups both recompute the outputs. 4. Mirror/copy-to-normal switching recreates the Output object of a still-alive WOutput; re-enabling it recomputes once, without touching the destroyed object. fix(core): 输出重新使能时重算 surface 的输出集合 1. updateSurfaceOutputs() 会把未使能的输出过滤掉,所以屏幕被 DPMS 关掉 时,窗口的输出列表和 framePacingOutput 会被清空。输出再次使能不是几何 变化,而全仓除 XWayland 桌面属性外没有任何 WOutput::enabledChanged 的消费者,于是没人重算输出:scheduleFrameIfNeeded() 与 renderEnd 的 frame-done 闸门同时关死,窗口永远停在最后一帧。 2. RootSurfaceContainer::addOutput() 现在同时连接 WOutput::enabledChanged, 在输出真正使能后(提交事件发出前标志位已更新)重算所有非 layer surface 的输出。surface 被重新 enter,frame pacing 输出恢复,客户端 重新出图。 3. 处理函数是读 sender 的成员槽,不是捕获 Output 的 lambda:镜像/扩展模式 切换时 OutputManager 会重建 Output 而同一个 WOutput 继续存活,捕获的 指针会比对象活得久。配合 Qt::UniqueConnection,同一个 WOutput 无论被 注册几次都只有一条处理函数,removeOutput() 也就不需要额外断开。 4. 同一故障的第二种情形也一并覆盖:输出被重新添加时 addOutput() 早于首次 enable 提交,重算同样会看到空集合,使能后走同一条路径恢复。 5. 关闭输出时仍然和以前一样清空集合,只补上了回来的路,DPMS 关闭路径 行为不变。 Log: 修复关屏再点亮后 Wayland 窗口内容冻结的问题 Influence: 1. 锁屏、等屏幕真正熄灭后解锁:在熄屏期间被移动/改过尺寸的原生 Wayland 窗口不再冻结,输出使能后立即重绘。 2. 掉出所有输出的窗口保持清晰(不降采样)的内容,并恢复接收 frame 回调。 3. 未被碰过的窗口在往返后不变,单屏与多屏都会重算输出。 4. 镜像转普通模式会重建 Output 而 WOutput 不变,使能时只重算一次,不会 碰到已销毁的对象。 Multica Issue: WM-968
A window that drops off every output keeps an empty outputs list and no framePacingOutput, which stops its frame callbacks. The existing debug fields show the symptom but not the cause, so the two candidate causes cannot be told apart: DPMS turning the output off before a geometry change, or an output being added before its first enable commit. Record per surface, and expose in `treeland-debug --json windows`: 1. lastLeaveOutput / lastLeaveOutputEnabled / lastLeaveEmptiedOutputs: the most recent leave caused by an output recompute, whether that output was enabled at that moment, and whether the surface was left on no output at all. 2. lastOutputsUpdateReason: the trigger of the last updateSurfaceOutputs() call -- geometryChanged, surfaceAdded, addOutput or enabledChanged. 3. lastOutputsUpdateEnabled / lastOutputsUpdateTotal / lastOutputsUpdateComputed: how many outputs the compositor had enabled vs. in total in its output model at that call, and the size of the list handed to setOutputs(). 4. lastOutputsUpdateAutomatic: positionAutomatic() at that call, i.e. whether the ownsOutput fallback was armed. Every lastOutputsUpdate* value is written in one place (SurfaceWrapper::noteOutputsUpdate), so the four of them always describe the same call and cannot be mixed with one made by another caller of setOutputs(). The two bools have no "never happened" value: an empty lastLeaveOutput / lastOutputsUpdateReason is the unset marker. Diagnostics only: nothing here changes compositor behaviour. WindowInfo is a rep POD, so the fields change the wire layout and treeland and treeland-debug must be built from the same revision; an older compositor answers with the defaults. Multica Issue: WM-968 Signed-off-by: JiDe Zhang <zhangjide@uniontech.com>
1. Keep the update reason as SurfaceWrapper::OutputsUpdateReason and turn it into text only where WindowInfo is filled: the call sites and the struct deal with the enum, the string stays a rep wire detail. 2. Record the leave diagnostics only for the leaves that a RootSurfaceContainer recompute causes. A layer container re-homes its surface through the same setOutputs(), and such a leave was reported as an output recompute, pairing it with an unrelated reason. 3. Document why layer surfaces are skipped in onOutputEnabledChanged(): the layer branch of updateSurfaceOutputs() intersects geometry without the isEnabled() filter, so recomputing a layer surface there would put it back on an output that is still off. Their outputs belong to OutputLayerSurfaceContainer, which is also why the loop in addOutput() skips them. 4. Say in the code that the branch above is unreachable today (every caller skips layer surfaces) and what making it reachable would need, and that the camelCase reason names are the wire contract, so QMetaEnum::valueToKey() must not replace them. Diagnostics only: nothing here changes compositor behaviour. Log: No user-facing changes Influence: 1. `treeland-debug --json windows` still reports the same reason names -- geometryChanged / surfaceAdded / addOutput / enabledChanged -- and the leave fields still move only for an output recompute. 2. A layer surface re-homed by its OutputLayerSurfaceContainer, and the prelaunch splash path, no longer overwrite lastLeaveOutput / lastLeaveOutputEnabled / lastLeaveEmptiedOutputs. 3. Turning the screen off with DPMS and locking/unlocking still refills the outputs and the frame pacing output: the leave/enter call sequence is unchanged. refactor(treeland-debug): 按评审意见修订输出诊断 1. 更新原因保持 SurfaceWrapper::OutputsUpdateReason 枚举,只在填 WindowInfo 处转成文字:调用点和结构体只处理枚举,字符串仍是 rep 的 wire 细节。 2. 只有 RootSurfaceContainer 重算造成的 leave 才记诊断。layer 容器通过同一个 setOutputs() 重新挂载 surface,此前那种 leave 会被当成一次输出重算,并与 无关的 reason 配对。 3. 写明 onOutputEnabledChanged() 跳过 layer surface 的理由: updateSurfaceOutputs() 的 layer 分支只做几何相交、没有 isEnabled() 过滤, 在那里重算 layer surface 会把它重新挂到一块还关着的输出上。layer 的输出本 来就由 OutputLayerSurfaceContainer 给出,addOutput() 的循环也因此跳过它们。 4. 写明上面那个分支今天不可达(所有调用点都跳过 layer surface),以及要让它 可达需要先加什么;也写明小写驼峰的 reason 名是 wire 契约,不能用 QMetaEnum::valueToKey() 替换。 Log: 无用户可见变化 Influence: 1. `treeland-debug --json windows` 打印的 reason 名不变(geometryChanged / surfaceAdded / addOutput / enabledChanged),leave 字段仍只在输出重算时 更新。 2. 被 OutputLayerSurfaceContainer 重新挂载的 layer surface 与 splash 的 prelaunch 路径,不再覆盖 lastLeaveOutput / lastLeaveOutputEnabled / lastLeaveEmptiedOutputs。 3. 用 DPMS 关屏再锁屏解锁,仍会重填 outputs 与 frame pacing 输出:leave/enter 调用序列未变。 Multica Issue: WM-968 Signed-off-by: JiDe Zhang <zhangjide@uniontech.com>
Add xcb-shape to the wlroots CMake dependencies and libxcb-shape0-dev to the Debian build dependencies. Log: add XCB Shape dependency PMS: BUG-380929 Influence:
Add a real C Wayland client regression test with byte-level selection pipe assertions. Cover same-client focus changes, temporary focus clearing, cross-client invalidation, focus return, and selection source replacement and destruction. Use a headless Treeland fixture and production keyboard focus APIs. Register the test target and document its coverage and remaining limits. 新增真实 C Wayland 客户端回归测试,对 selection pipe 传输进行字节级断言。 覆盖同客户端焦点切换、焦点短暂清空、跨客户端失效、焦点返回,以及 selection source 替换和销毁。 使用 headless Treeland 夹具和生产键盘焦点 API,注册测试目标, 并记录测试覆盖范围及剩余边界。 Log: cover clipboard offer lifetime across focus changes Change-Id: Ie94c07a014c4445d74cfecec8ba6138c8b44fef1 Pms: BUG-380479
Use Xwayland input regions for surface hit testing and restrict the window decoration mouse area to the resize rim so that input can pass through holes in shaped windows. Log: implement X Shape input regions PMS: BUG-380929 Influence: Xwayland window input handling and decoration hit testing
Drive the icon and the window content with complementary full-duration OutExpo curves, so the window's visible weight follows OutExpo and the icon's follows 1 - OutExpo, instead of a linear icon fade over half the duration. Both layers share a single progress property, and the direction magic number becomes a Direction enum. Blend the two captured textures in one fragment shader. Fading two independently translucent items would let the desktop through as p * (1 - p), peaking at 25% around 40 ms into a 400 ms run: their alphas sum to one, but both still composite over the desktop. In a single pass the combined coverage stays 1 wherever the window is painted. Capture only the window content and draw the decoration shadow from the animation item with the same progress, so the shadow fades together with the window and never pops when the real window takes over. The shadow now follows the per-window shadowVisible flag as well. 用完整时长、互补的 OutExpo 曲线驱动图标与窗口内容:窗口可见权重遵循 OutExpo,图标遵循 1 - OutExpo,替代原来半时长的线性图标淡化。两层共用 一个 progress 属性,方向魔数改为 Direction 枚举。 两种纹理在同一个片元着色器里混合。两层各自独立淡化时,alpha 之和虽为 1,但都要与桌面合成,交叉期间桌面会以 p*(1-p) 透出(400ms 约 40ms 处 峰值 25%);单 pass 混合后,窗口绘制区域的合成覆盖率恒为 1。 窗口纹理只抓取内容,装饰阴影改由动画项按 progress 绘制,因此阴影随窗口 一起淡入淡出,动画结束交给真实窗口时不会跳变;阴影同时开始遵循窗口的 shadowVisible 开关。 Log: 图标到窗口过渡改为单 pass 互补 OutExpo 交叉淡化,并修正阴影 PMS: TASK-395857 Influence: 开窗/关窗的图标到窗口过渡中,窗口可见权重为 OutExpo、图标为 1-OutExpo;交叉期间不再有桌面透出;阴影随过渡淡入淡出并遵循 shadowVisible;无图标源 surface 时窗口全程可见。
Replace the four hard-coded resize rim widths in Decoration.qml with a read-only edgeSize property on the root item, following the existing screenEdgeMargin pattern in DockPreview.qml. The resize rim and the containmentMask band now share one source: shrinking only one of them would let the mask pass the inner rim and steal clicks from the client. edgeSize is declared as real to match the qreal edgeSize parameter of WaylibHelper.getEdges(). Log: resize rim width of Decoration.qml becomes one edgeSize constant Influence: 1. Resize a window from every edge and corner, small windows included 2. Check clicks near the inner rim still reach the client surface 3. Check Xwayland shaped windows keep their holes ungrabbable refactor: 将装饰层 resize 边宽魔法数 10 提取为常量 将 Decoration.qml 中四处硬编码的 resize 边宽 10 改为根 item 上的只读 edgeSize 常量,沿用 DockPreview.qml 中 screenEdgeMargin 的写法。resize 环与 containmentMask 放行区由此共用同一个真源:只调小其中一处会让 mask 放行内侧 rim,抢走本该交给客户端的点击。edgeSize 声明为 real,与 WaylibHelper.getEdges() 的 qreal 参数类型一致。 Log: Decoration.qml 的 resize 边宽 10 收敛为单一 edgeSize 常量 Influence: 1. 验证从四边、四角缩放窗口,含小窗口 2. 验证窗口内侧边缘处的点击仍能传给客户端 3. 验证 Xwayland 异形窗口的输入空洞仍不可抓取 PMS: BUG-380929 Multica Issue: WM-977
1. Request the keyboard focus for a session lock surface once it becomes focusable (mapped): WSessionLockSurface has no Activate capability, so the normal activation path refuses it and the surface never asks. 2. Drop the keyboard focus of the session being locked as soon as the client takes the lock, so key events reach no client while the lock surface is not mapped yet (primary seat; per-seat lock is not supported). 3. Snapshot the focused surface when locking and restore it on unlock, falling back to the current workspace's latest active window. Log: once a session is locked, key events no longer reach the locked session's hidden window Influence: 1. Lock the session with a shortcut and type immediately, before the lock surface appears; the locked session must not receive those keys. 2. Lock the session and type without clicking the lock surface first; the password field must receive the keys. 3. Lock the session and try to give another window the focus; the lock surface must keep it, and the focus must return to the previous window after unlocking. fix(lockscreen): 锁屏 surface 映射时主动获取键盘焦点 1. 锁屏 surface 变为可聚焦(mapped)时直接请求键盘焦点: WSessionLockSurface 没有 Activate 能力,常规激活路径会拒绝它, 该 surface 从不会主动申请焦点。 2. 客户端取得 session lock 时立即清掉被锁会话的键盘焦点,锁屏 surface 尚未映射的这段时间按键不会送给任何客户端(仅主 seat,per-seat 锁屏尚未支持)。 3. 锁定时快照焦点窗口,解锁时恢复;不可用时回退到当前工作区最近活跃窗口。 Log: 会话锁定后,按键不再发给被锁会话的隐藏窗口 Influence: 1. 用快捷键锁定会话后立刻打字,被锁会话不应收到这些按键。 2. 锁定后不点击锁屏界面直接打字,密码框应能收到按键。 3. 锁定后尝试让其他窗口获得焦点,锁屏 surface 应保持焦点;解锁后焦点 应回到原窗口。 Multica Issue: WM-933
1. Remove the per-wrapper surfaceModeChanged connect duplicating the global onSurfaceModeChanged handler. 2. Replay the pre-registration decoration mode once instead, keeping the race fix without duplicated live updates. 3. Drop the dead updateTitleBar guard: noTitleBar() already folds in noDecoration, so it never changed behavior. Log: No user-facing changes Influence: 1. Open an SSD xdg-decoration toplevel and confirm the titlebar and frame render. 2. Map a window whose decoration mode was negotiated before wrapper creation and confirm it gets the correct frame state. 3. Toggle client/server-side decoration at runtime and confirm the frame updates once without flicker or stale state. refactor(surface): 去除重复的装饰模式处理 1. 移除每个 toplevel 上重复的 surfaceModeChanged 连接,它与全局 onSurfaceModeChanged 处理器重复。 2. 改为在 wrapper 创建时回放一次注册前的装饰模式,保留竞态修复但不重复实时更新。 3. 删除 updateTitleBar 中的死分支:noTitleBar() 已并入 noDecoration, 不会改变任何行为。 Log: 无用户可见变化 Influence: 1. 打开使用服务端装饰(SSD)的 xdg-decoration 顶层窗口,确认标题栏与边框正常。 2. 映射一个在 wrapper 创建前已协商装饰模式的窗口,确认边框状态正确。 3. 运行时在客户端/服务端装饰间切换,确认边框只更新一次,无闪烁或陈旧状态。 PMS: TASK-390751
…ocol 1. Popups now follow their parent's decoration state by default; layers keep no frame. 2. Any treeland-decoration request on a popup or layer shell enables the compositor frame one-way (irreversible). 3. set_titlebar_mode requests on non-toplevel surfaces are ignored. Log: popup and layer surfaces may now gain a frame after decoration requests Influence: 1. Open a popup whose parent is SSD and confirm the popup shows a frame. 2. Open a popup whose parent is CSD and confirm the popup has no frame. 3. Have a layer client send a decoration request and confirm it gains a frame that cannot be removed. feat(surface): 通过 decoration 协议让非 toplevel 窗口启用服务端装饰 1. popup 默认跟随 parent 的装饰状态;layer 默认无边框。 2. popup 或 layer 一旦调用 treeland-decoration 协议,即单向启用(不可撤销)合成器边框。 3. 忽略非 toplevel 窗口的 set_titlebar_mode 请求。 Log: popup 与 layer 窗口在收到 decoration 请求后可能获得边框 Influence: 1. 打开 parent 为 SSD 的 popup,确认其显示边框。 2. 打开 parent 为 CSD 的 popup,确认其无边框。 3. 让 layer 客户端发送 decoration 请求,确认其获得不可移除的边框。 PMS: TASK-390751
1. Defer set_mode until the toplevel initializes; it asserts surface->initialized otherwise 2. Re-run updateDecorationMode on the first commit to emit the configure clients wait for Log: Fix alacritty showing double titlebar Influence: 1. Launch alacritty under treeland and verify only one titlebar shows 2. Verify other server-side-decorated clients still get a single titlebar 3. Verify set_mode before first commit no longer crashes or stalls configure fix: toplevel 初始化后再应用装饰模式 1. 将 set_mode 延迟到 toplevel 初始化之后,否则会断言 surface->initialized 2. 在首次 commit 时重跑 updateDecorationMode 发出客户端等待的 configure Log: 修复 alacritty 显示双标题栏 Influence: 1. 在 treeland 下启动 alacritty,确认只显示一个标题栏 2. 确认其他 server-side decoration 客户端仍只显示一个标题栏 3. 确认首次 commit 前发送 set_mode 不再崩溃或卡住 configure ISSUE: 1606
1. `wlr-randr --output eDP-1 --off` followed by `--on` crashed treeland: the same wlr_output_configuration_v1 was answered and destroyed twice. The apply loop commits an output that was just enabled synchronously, so onOutputCommitFinished() had already sent the result and freed the configuration before testOrApplyConfiguration() returned, and the tail of that function (and the error branches after it) answered the same, now freed, config again. 2. OutputManager now answers through answerOnce(): the result is sent and m_pendingOutputConfig is cleared only while this config is still the pending one, so a re-entrant or late answer is dropped instead of destroying the configuration a second time. 3. WOutputManagerV1::sendResult() keeps a second line of defence in waylib: only a config still registered in pendingStateLists is answered and destroyed, anything else is ignored with a warning, and the header states that contract for future callers. Log: Fixes the treeland SEGV that dropped the session back to the greeter when an output was enabled again through output-management (wlr-randr --output eDP-1 --off / --on). Influence: 1. On a machine with a real output, run `wlr-randr --output eDP-1 --off` followed by `--on` five times in a row: treeland keeps running, every call succeeds, and the session is not lost. 2. Enable an output with another output-management client (kscreen) and check it receives a result instead of hanging, with the requested mode and scale applied. 3. Turn the output off and on again while windows are open and check the windows come back on that output with a non-empty outputs list. fix(output): 同一份输出配置只答复一次 1. `wlr-randr --output eDP-1 --off` 后再 `--on` 会让 treeland 崩溃:同一个 wlr_output_configuration_v1 被答复并 destroy 了两次。apply 循环里“刚被 enable 的输出”是同步提交的,onOutputCommitFinished() 在 testOrApplyConfiguration() 返回之前就已经发出结果并释放了 config, 而该函数尾部(以及其后的错误分支)又对同一份已释放的 config 答复了一次。 2. OutputManager 改为统一走 answerOnce():只有这份 config 仍是 pending 的 那一个时,才发送结果并清空 m_pendingOutputConfig,apply 期间的重入答复 或迟到答复会被丢掉,不再二次 destroy。 3. waylib 的 WOutputManagerV1::sendResult() 作为第二道防线:只有仍登记在 pendingStateLists 里的 config 才被答复和 destroy,其它入参只告警不处理, 头文件里写明这条契约,避免将来新增调用者踩坑。 Log: 修复通过 output-management(wlr-randr --output eDP-1 --off / --on) 重新点亮输出时 treeland SEGV、会话掉回 greeter 的问题。 Influence: 1. 真机单屏:连续 5 次 `wlr-randr --output eDP-1 --off` 与 `--on`, treeland 不崩、每次都返回成功、会话不掉。 2. 用其它 output-management 客户端(如 kscreen)开启输出,确认能收到答复 而不挂起,且请求的模式与缩放已生效。 3. 打开若干窗口后再次 off/on,确认窗口回到该输出上且 outputs 列表非空。 Multica Issue: WM-970
1. Add always_on_top support and report effective roles to v2 clients. 2. Synchronize client role requests with window menu pin and unpin actions. 3. Cover role events and window stacking in protocol tests and the demo. Log: DDE shell clients can request always-on-top and track role changes. Influence: 1. Verify client requests and window menu actions update the effective role. 2. Check role event payloads and window z ordering in the protocol test. 3. Use test-dde-shell to compare the requested and effective roles. feat: 同步 DDE Shell 角色与窗口置顶状态 1. 支持 always_on_top,并向版本 2 客户端报告实际角色。 2. 同步客户端角色请求与窗口菜单的置顶和取消置顶操作。 3. 更新协议测试和 demo,覆盖角色通知与窗口层级。 Log: DDE Shell 客户端可申请始终置顶,并接收实际角色变化。 Influence: 1. 验证客户端请求和窗口菜单操作能同步实际角色。 2. 通过协议测试检查 role 事件载荷和窗口 z 层级。 3. 使用 test-dde-shell 对照请求角色和实际角色。 PMS: TASK-398293
Move the per-window slot, the preview view, the surface and the tooltip layers into their own files. Keep the layout math in the controller so the frame size and the slot targets cannot drift apart. 把预览的槽、视图、面板和 tooltip 层拆成独立组件,布局计算统一收在控制器里。 Log: 拆分 DockPreview 组件并统一布局计算 PMS: TASK-396711 Influence: 无行为变化;预览布局、关闭动画和缩放中心与拆分前一致。
Expose Xwayland bounding shape contours through waylib and use them to clip window content in QML with hardware rendering. Merge region rectangles before rendering to avoid antialiasing along shared edges. Log: implement X Shape clipping PMS: BUG-380929 Influence: Shaped Xwayland window rendering with hardware acceleration
1. setupHandleForWrapper() sent "SplashScreen: <appId>" as the initial title of a prelaunch splash handle, so the taskbar showed a placeholder title for a window that does not exist yet. 2. Drop that set_title() call: the splash handle's first snapshot now carries app_id, state and identifier only. initializeToplevelHandle() still sends surface->title() once the real toplevel exists, and keeps following titleChanged. 3. Non-splash paths (XdgToplevel, XWayland) are unchanged. fix(foreign-toplevel): splash 阶段不再发送占位标题 1. setupHandleForWrapper() 给 prelaunch splash handle 的初始快照发送 "SplashScreen: <appId>" 作为 title,任务栏因此为一个尚不存在的窗口 显示了占位标题。 2. 去掉这次 set_title():splash handle 的首个快照只带 app_id、state 和 identifier。真实 toplevel 就绪后仍由 initializeToplevelHandle() 发送 surface->title(),并继续跟随 titleChanged。 3. 非 splash 路径(XdgToplevel / XWayland)行为不变。 Log: 任务栏在 splash 阶段不再显示 "SplashScreen: xxx" 占位标题,真实窗口 出现后才显示真实标题。 Influence: 1. 从任务栏启动一个带 prelaunch splash 的应用,观察 splash 期间任务栏项 没有标题(不出现 "SplashScreen: xxx"),真实窗口出现后显示正确标题。 2. 对 XdgToplevel 与 XWayland 应用重复上述操作,确认标题行为与改动前一致。 3. splash 超时未被匹配时确认任务栏项正常消失,不残留占位标题。 Multica Issue: WM-979 PMS: BUG-381175
The fixture kept production geometry transitions short with setAnimationSpeed(0.1f) and then waited for the geometry animation's finished() signal in a nested event loop to learn when the state had landed. That signal can already be emitted inside render(), before the connection, and is never replayed, so the server thread occasionally stayed in the loop until the ctest timeout killed the test (~1-2 of 10 local runs). Follow treeland-foreign-toplevel-manager-v3 instead: disable the maximize / fullscreen / restore geometry animations through AnimationConfig, so every request applies its surface state directly, and let the fixture only render one frame. The animation-only diagnostic fields go away with the wait, and the README no longer describes waiting for the animation signal. Log: 与 v3 foreign-toplevel 用例统一,关闭几何动画后不再有动画竞态 Influence: wlr-foreign-toplevel 用例耗时从 ~0.5s 降到 ~0.1s,全量 93/93 稳定通过 Issue: WM-1058
Session teardown now destroys the image-copy-capture globals immediately (wlr_ext_image_copy_capture_manager_v1_destroy(manager, false) via NativeSessionProtocol), so the wl_global pointers the fixture kept in captureGlobals are freed before lifecycle_remove() reads their user data. That read is undefined behaviour and made the "globals_retired" check fail on a clean master (0 instead of 2). Those two managers expose no destroy signal, so count them as observed interfaces and assert the teardown through the destroy probes plus interface detachment, which is what the immediate destruction actually guarantees. Document the reason in the README. Log: 修复会话销毁用例读取已释放 global 的未定义行为 Influence: test_session_protocol_lifecycle 在干净 master 上恢复通过 Issue: WM-1058
Groveer
reviewed
Nov 23, 2026
Groveer
left a comment
Contributor
There was a problem hiding this comment.
基于 ee0bb8e6 的三条行内审查意见:一个已复现的注销时子连接清理问题,以及回归测试和 FD 持有简化建议。验证使用 headless/pixman 环境,未做真实 DDM 跨 UID 全流程验证。
zorowk
force-pushed
the
fix_lockscreen
branch
4 times, most recently
from
November 23, 2026 08:59
44d6014 to
b08901f
Compare
Groveer
approved these changes
Nov 24, 2026
Remove the redundant WLR::Transform enum and wtypes files. Use WOutput::Transform for WSurface orientation and remove obsolete CMake entries. Log: unify transform types in waylib PMS: TASK-390751 Influence: Waylib output and surface orientation APIs
Logind lock signals could affect another user desktop, and a same-user relogin could fail while the previous desktop remained registered with a different session ID. - Move logind Lock/Unlock subscriptions into Session and release them on removal. Forward the source Session to LockScreenManager instead of resolving its identity in a worker thread, and restore missing paths asynchronously for existing DDM sessions. - Replace the previous same-user desktop when a new login ID arrives. Resolve the active session after replacement so the greeter fallback is deactivated before activating the new desktop. - Preserve background-session relocking and clear lock state after successful DDM activation. Document runtime debugging and native protocol teardown constraints. Keep lock transitions and desktop lifetime scoped to the owning session. Preserve bootstrap desktop protection, cross-user ID ownership checks and same-ID reuse. Log: scope logind lock transitions to the active session PMS: TASK-398167 Influence: session locking, unlocking, relogin and recovery
Rename hasDrm, hasX11 and hasWayland to isDrm, isX11 and isWayland. Add isMulti and use native wlroots functions for backend type checks. Expose backend types and isSessionActive as read-only Qt properties. Update the QML example and backend tests. Log: expose backend type and session state in waylib PMS: TASK-390751 Influence: Waylib backend type and session state APIs
Size a slot from the fitted picture instead of reserving a gap for the border, and round the picture box to whole pixels so the strip lands on the pixel grid. 行的排布改为直接按图片尺寸计算,不再为边框预留 4 px,并把图片框取整到 整像素。 Log: 预览条按图片尺寸排布并取整整像素 PMS: TASK-396711 Influence: 缩略图之间的间距与位置,不改变窗口预览的内容与交互。
Replace the per-slot borders with one highlight frame owned by the view, so it slides between slots instead of fading on each of them. The view reserves a frame margin outside its layout, and the scroll hints inset by that margin. 悬浮外框改由视图统一绘制,在槽位之间滑动,取代每个槽位各自的边框淡入 淡出;视图在布局之外预留外框宽度,滚动提示按该宽度内缩。 Log: 预览条改由统一外框标识悬停窗口 PMS: BUG-297011 Influence: 缩略图悬停高亮的绘制归属与滑动效果,焦点窗口的标识方式变化。
Split the shared panel padding into a thumbnail padding and a list panel padding, and give each presentation its own content rect and frame budget, so one presentation's inset no longer leaks into the other's geometry. 面板内边距拆分为缩略图内边距与列表内边距,各呈现方式使用自己的内容矩形和 尺寸上限,互不影响。 Log: 缩略图与列表各自使用独立的内边距 PMS: TASK-396711 Influence: 两种呈现方式的面板尺寸与内容位置,不影响窗口内容本身。
The pictures of a slot now go through a single rounded mask instead of one per layer. The picture is fed by a hidden mirror, so it keeps the last frame once the slot starts closing and the window may already be gone. 槽位内的所有图层改为共用一张圆角遮罩,不再逐层裁剪。图片由一个隐藏的镜像 供给,因此槽位开始收起、窗口可能已经销毁时仍保留最后一帧的画面。 Log: 缩略图槽位共用一张圆角遮罩 PMS: BUG-341115 Influence: 缩略图圆角裁剪的正确性,窗口关闭时的残留画面。
A resized window sent one relayout per size signal, so the strip recomputed every slot and restarted their move animations many times in one event loop turn. Coalesce the changes into one layout pass and place the slots directly at their new rects; while the resize lasts the panel snaps with them instead of easing behind. 被预览的窗口缩放时,每个尺寸信号都会触发一次重排,同一轮事件循环里反复 重算槽位、反复重启位移动画。改为把尺寸变化合并成一次布局,并让槽位直接 落到新矩形;缩放期间面板与槽位一起落位,不再单独缓动。 Log: 窗口缩放时预览条合并重排 PMS: TASK-396711 Influence: 被预览窗口连续缩放时,面板与槽位一起落位;增删窗口的动画不变。
The preview took its corners from DTK's menu and control styles. Derive them from the system window radius instead: the panel uses it as is, the tooltip, the thumbnails and the list rows use half of it. 预览的圆角原先取自 DTK 的菜单与控件样式,改为跟随系统窗口圆角:面板直接 使用该值,tooltip、缩略图与列表行取一半。 Log: 预览圆角跟随系统窗口圆角 PMS: BUG-341115 Influence: 预览面板、tooltip、缩略图与列表行的圆角随用户窗口圆角设置变化。
The title row is now sized by its icon: a 24px icon, 5px to the text, 8px to the panel top and 8px to the strip. The left inset stays at 10. 标题行改为按图标定尺寸:图标 24px,距文本 5px,距面板上边 8px,距槽带 8px;左侧边距保持 10px。 Log: 预览标题行按 24px 图标排版 PMS: BUG-341123 Influence: 标题行固定 24px 高,图标、文本、面板上边与槽带的间距调整,缩略图顶部布局随之变化。
The slot size used 80, 120 and 240 inline. Name them by what they bound: the ratio-driven side and the short side of a slot. 槽位尺寸里直接写死的 80、120、240 改为具名常量,分别表示随窗口比例变化的 那条边的上下界和槽位短边。 Log: 预览槽位尺寸改为具名常量 PMS: TASK-396711 Influence: 仅代码可读性,槽位尺寸不变。
1. Remove WLR_VERSION/WLR_VERSION_MAJOR/MINOR/PATCH from waylib's wconfig.h.in; WLR_HAVE_* feature macros are kept in use. 2. Drop the pkg_get_variable(WLR_VERSION_*) lines in waylib/src/server/CMakeLists.txt; WLROOTS_VERSION stays for the wlroots CMake export sanity check. 3. Remove the always-true WLR_VERSION_MINOR > 16 condition from ENABLE_VULKAN_RENDER (wlroots is pinned to 0.20). Log: No user-facing changes Influence: 1. Configure and build treeland: generated wconfig.h contains no WLR_VERSION macros 2. Build waylib standalone against waylib-wlroots.pc: feature macros stay intact 3. Verify Vulkan rendering path (ENABLE_VULKAN_RENDER) still compiles with wlroots 0.20 refactor: 移除不再需要的 WLR_VERSION 宏 1. waylib 的 wconfig.h.in 删除 WLR_VERSION/WLR_VERSION_MAJOR/MINOR/PATCH 宏,保留仍在使用的 WLR_HAVE_* feature 宏 2. 删除 waylib/src/server/CMakeLists.txt 中 pkg_get_variable(WLR_VERSION_*) 三行;WLROOTS_VERSION 保留用于 wlroots CMake export 存在性检查 3. ENABLE_VULKAN_RENDER 条件去掉恒真的 WLR_VERSION_MINOR > 16 (wlroots 锁定 0.20) Log: 无用户可见变化 Influence: 1. 配置并编译 treeland:生成的 wconfig.h 不再包含任何 WLR_VERSION 宏 2. waylib standalone 方式基于 waylib-wlroots.pc 构建:feature 宏保持完整 3. 验证 Vulkan 渲染路径(ENABLE_VULKAN_RENDER)在 wlroots 0.20 下正常编译
1. wlroots 0.20.2 moved to dde-wlroots and is shipped only as the dde-wlroots-dev package (static libdde-wlroots.a) 2. Resolve it via the pkg-config module dde-wlroots and regenerate wconfig.h from its version/feature variables 3. Read wlr-private protocol XMLs from the wlr-protocols package, vendoring only the wlroots-only XMLs (drm, input-method-v2, virtual-keyboard) under tests/protocols/xml Log: 使用 dde-wlroots-dev 静态包,移除 wlroots subtree Influence: 1. Build requires installing dde-wlroots-dev and wlr-protocols first 2. Verify treeland/waylib have no runtime dependency on wlroots shared libs 3. Verify protocol tests still cover the vendored wlroots-only XMLs build(wlroots): 使用 dde-wlroots-dev 静态包 1. wlroots 0.20.2 迁移至 dde-wlroots,仅以 dde-wlroots-dev 包发布 (静态库 libdde-wlroots.a) 2. 通过 pkg-config 模块 dde-wlroots 解析,并用其版本/特性变量重新生成 wconfig.h 3. wlr 私有协议 XML 改由 wlr-protocols 包提供,仅 drm、input-method-v2、 virtual-keyboard 等 wlroots 专有 XML 保留在 tests/protocols/xml Log: 使用 dde-wlroots-dev 静态包,移除 wlroots subtree Influence: 1. 构建前需先安装 dde-wlroots-dev 与 wlr-protocols 包 2. 验证 treeland/waylib 运行时不再依赖 wlroots 动态库 3. 验证协议测试仍能覆盖 vendor 的 wlroots 专有 XML
1. Add TREELAND_FETCH_DDE_WLROOTS option (default OFF) to resolve dde-wlroots from exactly one of two mutually exclusive ways: FetchContent builds it in-tree, otherwise pkg-config discovers the installed dde-wlroots-dev package. 2. FetchContent_MakeAvailable defines Wlroots::wlroots and exports WLR_HAVE_*/WLROOTS_VERSION so waylib regenerates wconfig.h in-tree; key waylib's wlroots branch off the option accordingly. 3. Drop the stale 3rdparty/wlroots include fallback and switch the Arch/Debian/Deepin CI to FetchContent (no clone+install steps, no dde-wlroots-dev Build-Depends). Log: No user-facing changes Influence: 1. Configure with -DTREELAND_FETCH_DDE_WLROOTS=ON and no installed dde-wlroots-dev: treeland and standalone waylib build dde-wlroots from source. 2. Configure without the option: behavior is unchanged and still resolves the installed dde-wlroots via pkg-config. 3. Run the Arch/Debian/Deepin CI: dde-wlroots is fetched in-tree instead of cloned and installed separately. feat: 通过 FetchContent 从源码编译 dde-wlroots 1. 新增 TREELAND_FETCH_DDE_WLROOTS 选项(默认 OFF),dde-wlroots 只从 两种互斥方式中选其一解析:FetchContent 在树内构建,否则 pkg-config 发现已安装的 dde-wlroots-dev 包。 2. FetchContent_MakeAvailable 定义 Wlroots::wlroots 并导出 WLR_HAVE_*/WLROOTS_VERSION,使 waylib 在树内重新生成 wconfig.h; waylib 的 wlroots 分支据此以该选项为键。 3. 删除过时的 3rdparty/wlroots include 回退,并将 Arch/Debian/Deepin CI 改为 FetchContent(无克隆安装步骤、无 dde-wlroots-dev 构建依赖)。 Log: 无用户可见变化 Influence: 1. 不带 dde-wlroots-dev 包,以 -DTREELAND_FETCH_DDE_WLROOTS=ON 配置: treeland 与 standalone waylib 从源码编译 dde-wlroots。 2. 不传该选项:行为不变,仍通过 pkg-config 解析已安装的 dde-wlroots。 3. 运行 Arch/Debian/Deepin CI:dde-wlroots 在树内拉取, 而非单独克隆安装。
Register each user’s Wayland listener at startup and compositor recovery. - Reuse repeated registrations of the same listener and track its D-Bus owner so disconnects release only the matching user socket. Duplicate received descriptors for WSocket ownership and synchronize child socket enablement with the owning Session. Log: preserve user Wayland sockets across desktop switches PMS: TASK-398167 Influence: user switching, Wayland activation and session teardown
Relogin with a new session ID replaces a desktop and its protocol globals. User socket registration and logout also need a test that runs independently of output scaling. - Repeat same-account relogin with new session IDs and check that retiring the old session preserves activation of the replacement and each session exposes its own globals. - Exercise repeated listener registration, owner handover and listener replacement through D-Bus with live Wayland clients. - Verify logout closes registered and descendant socket clients while leaving an unrelated session connected. Keep registry isolation and socket teardown observable across session transitions. Session registry and user socket integration tests. Log: cover relogin isolation and user socket lifecycle PMS: TASK-398167 Influence: same-user relogin, Wayland registry isolation and socket teardown
zorowk
force-pushed
the
fix_lockscreen
branch
from
November 25, 2026 01:27
b08901f to
d405cc1
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Groveer, zorowk 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 |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复锁屏信号串用户及同用户重登失败。
logind 订阅归属到 Session,按来源会话处理锁屏。重新登录收到新 ID 时,清理旧 Session、创建新桌面,并正确完成活动会话交接。
修复 Wayland socket 注册和清理问题。
避免切换用户时重复注册,按所属用户和 socket 清理资源。激活返回 false 时重试,注册及环境更新成功后才报告 ready。
linuxdeepin/dde-session#246
Summary by Sourcery
确保多用户重登和会话切换期间正确交接活动桌面,并可靠管理 Wayland socket 生命周期。
Bug Fixes:
Enhancements:
Documentation:
Tests: