Repository navigation
Conversation
The treeland-dde-shell-v1 protocol is deprecated and dde-shell has migrated to treeland-dde-shell-unstable-v2, so drop the whole v1 implementation instead of keeping it for a transition period: - delete ddeshellmanagerinterfacev1.* and ddeshellattached.*, and the v1 protocol generation plus sources from the module CMakeLists - drop the v1 shell-surface path in ShellHandler; v2 already carries role, placement hints, skip flags and accept_keyboard_focus - drop the v1 per-surface/seat notifications from CompositorInputFilter and DragController; treeland-active-notify-unstable-v1 already reports the same activity and drag state - drop WindowOverlapChecker creation; treeland-region-watch-unstable-v1 covers the overlap checking - drop the v1 lockscreen resource handling; lock/shutdown/switch-user are triggered through treeland_compositor_action_v1 - drop the multitaskview toggle and the DDEShellHelper QML registration No behavior changes for v2 clients: the deleted v1 pieces have v2 or dedicated-protocol replacements for every request dde-shell uses.
Review follow-up for removing the v1 protocol: dropping the v1 path left ShellHandler::updateSurfaceAcceptKeyboardFocus() with no caller, and the v2 path only flipped the focus capability bit, so a dde-shell surface that set accept_keyboard_focus=false after being activated stayed in the activation history and could keep keyboard focus - the exact case the v1 helper handled. Route both v2 call sites through the helper (same behaviour v1 shipped with) instead of keeping a dead function.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-wm 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 |
Reviewer's GuideAPIRemove the deprecated v1 dde-shell protocol interfaces and their implementation together, since no compositor-side v1 API remains.
Uses of the APIStop registering or invoking v1-only protocol resources and notifications, relying on the dedicated compositor-action and active-notify protocols instead.
ImplementationRemove the v1 shell-surface handling and cleanup while keeping the v2 focus-update path responsible for clearing activation when focus is refused.
Simplify drag-controller initialization and drop its v1-specific drag notifications while retaining active-notify reporting.
Remove the legacy lock-screen resource callbacks now that lock, shutdown, and switch-user actions use the compositor-action protocol.
ConfigurationStop generating and compiling the deprecated v1 protocol sources in the dde-shell module.
DocumentationUpdate the protocol coverage index to remove the deleted dde-shell-v1 entry and its obsolete coverage caveat.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 4 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/lockscreen/lockscreenmanager.cpp" line_range="112" />
<code_context>
- if (m_server->isNormalOrMultitaskview())
- showLockScreen(false);
- });
- connect(lockScreen, &LockScreenInterface::switchUser, this, &LockScreenManager::showSwitchUser);
-}
-
</code_context>
<issue_to_address>
**Locked-screen user switching stops working**
When the lock-screen UI requests user switching while the compositor is in `CurrentMode::LockScreen`, `ShellActionExecutor::execute()` returns immediately in `CurrentMode::LockScreen`, so the replacement `action_show_user_switch` never reaches `WaylandServer::showSwitchUser()`; removing the direct `LockScreenInterface::switchUser` connection leaves the lock-screen UI unable to request a user switch.
Allow the user-switch action in lock-screen mode, or preserve a dedicated lock-screen request path for it.
</issue_to_address>
### Comment 2
<location path="src/core/shellhandler.cpp" line_range="1254" />
<code_context>
+ // Refusing keyboard focus must also drop a surface that was already
+ // activated/focused, not just flip the capability bit: dde-shell sets the
+ // property after the surface is mapped and often activated.
+ updateSurfaceAcceptKeyboardFocus(wrapper, shellSurface->acceptKeyboardFocus());
connect(shellSurface,
&DDEShellSurfaceV2::acceptKeyboardFocusChanged,
</code_context>
<issue_to_address>
**Focus fallback comes from another workspace**
When a v2 surface belongs to a session whose workspace differs from the global current workspace, `updateSurfaceAcceptKeyboardFocus()` removes the wrapper from `workspaceForSurface(wrapper)` but selects the fallback from `m_workspace->current()`; for a surface in a different session workspace, it therefore reads the wrong activation history and attempts to focus an unrelated window or leaves no fallback, disrupting focus for that session.
Select the fallback from the surface's session workspace rather than unconditionally from `m_workspace->current()`.
Also at `src/core/shellhandler.cpp:1259`.
</issue_to_address>
### Comment 3
<location path="src/core/shellhandler.cpp" line_range="1254" />
<code_context>
+ // Refusing keyboard focus must also drop a surface that was already
+ // activated/focused, not just flip the capability bit: dde-shell sets the
+ // property after the surface is mapped and often activated.
+ updateSurfaceAcceptKeyboardFocus(wrapper, shellSurface->acceptKeyboardFocus());
connect(shellSurface,
&DDEShellSurfaceV2::acceptKeyboardFocusChanged,
</code_context>
<issue_to_address>
**Focus cleanup lacks coverage**
When a v2 client denies keyboard focus after its surface is already active or focused, the v2 test's `set_keyboard_focus` case checks only that `accept_keyboard_focus` becomes false, so the new cleanup of an already activated or focused surface has no assertion. A regression in that observable focus transition therefore passes the protocol tests.
Add a protocol test that activates or focuses a mapped surface, denies keyboard focus, and asserts that the surface loses the corresponding activation and focus state.
Also at `src/core/shellhandler.cpp:1259-1260`.
</issue_to_address>
### Comment 4
<location path="src/core/shellhandler.cpp" line_range="1258-1260" />
<code_context>
- connect(ddeShellSurface,
- &DDEShellSurfaceInterface::acceptKeyboardFocusChanged,
- this,
- [this, wrapper](bool accept) {
- updateSurfaceAcceptKeyboardFocus(wrapper, accept);
- });
-}
-
</code_context>
<issue_to_address>
**Signal forwarding adds a lambda**
When the v2 surface emits `acceptKeyboardFocusChanged`, the callback only forwards the signal value and captured wrapper to `updateSurfaceAcceptKeyboardFocus()`, so this connection uses a lambda where the repository guidance says not to use one for forwarding to a single member function.
Use a member-function-pointer connection for this forwarding callback, following the repository guidance.
</issue_to_address>|
TAG Bot New tag: 0.12.2 |
treeland-dde-shell-v1is deprecated and clients have already moved totreeland-dde-shell-unstable-v2, so the compositor side implementation is dead code. This removes it together with everything that only existed to serve it.Changes
Protocol implementation and registration:
src/modules/dde-shell/ddeshellmanagerinterfacev1.{h,cpp}andddeshellattached.{h,cpp}src/modules/dde-shell/CMakeLists.txtm_ddeShellV1, the v1 attach, and thelockScreenCreated/toggleMultitaskviewconnections fromWaylandServer, along with theDDEShellHelperQML registrationCall sites that became dead code:
ShellHandler: removehandleDdeShellSurfaceAdded()and the v1 branches inensureXdgWrapper()/onXdgToplevelSurfaceRemoved()CompositorInputFilter,DragController(initialize(bool)->initialize(), callers updated): drop the v1 notificationsWindowOverlapCheckercreation removedLockScreenManager: removehandleLockScreen()/onLockScreenShutdown()and the v1 lock screen resource handling; the replacements (treeland_compositor_action_v1,action_toggle_multitask_view,treeland-active-notify-unstable-v1,region-watch) are already in placeShellHandler::updateSurfaceAcceptKeyboardFocus()is kept and reused by both v2 call sites, so it is not left as dead code.tests/protocols/INDEX.mdis updated accordingly.Verification
Against current
master(be61b3737):cmake --preset ci(CI's-Wall -Wextra -Werror) configure OK,cmake --build build --parallelexit 0ctest -L protocols: 73/73 passed, 0 faileddde-shell-v1/DDEShellSurfaceInterface/DDEShellHelper/WindowOverlapChecker/DDEShellManagerInterfaceV1/LockScreenInterface: no hits outsidedebian/changelogand the historical README release notesNot covered: no real compositor session run (no seat / DRM in this environment), and the activation/focus cleanup after
accept_keyboard_focus=falsestill has no automated test.Depends on the protocol package change: linuxdeepin/treeland-protocols#146.
Summary by Sourcery
Remove the deprecated dde-shell-v1 compositor support and clean up its obsolete integrations while consolidating behavior on dde-shell v2 and replacement protocols.
Bug Fixes:
Enhancements:
Build:
Documentation: