treeland_compositor_action_unstable_v1 ↗
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. SPDX-License-Identifier: MIT
- treeland_compositor_action_v1 — compositor action trigger
compositor action triggering for treeland
Warning! This protocol is EXPERIMENTAL and under active development. It may change at any time, including in backward-incompatible ways, without incrementing the interface major version and without prior notice. No compatibility guarantees of any kind are provided. Clients and compositors must track the upstream definition in treeland-protocols and must not rely on the current interface names, requests, events, or semantics remaining stable across releases.
This protocol allows a privileged DDE client such as the dock, the shutdown applet, or the greeter to trigger compositor actions directly, without registering a keyboard or gesture shortcut.
This protocol is independent of treeland_shortcut_manager_v3 and of any other Treeland protocol. The action values defined here form their own value space: they are not aligned with, and must not be assumed to match, the action enum of the shortcut manager. The compositor maps them to internal actions through its own table, and future versions of either protocol may add, renumber, or remove entries without regard to the other.
Following the split used by KWin, this protocol exposes only actions that are independent of the currently active window and of an in-progress keyboard task-switching sequence: workspace switching, show-desktop, the multitask overview, screen zoom, the FPS overlay, and session-level actions (lock, shutdown menu, user switch). Actions that act on the currently active window (maximize, minimize, close, move, resize, show the window menu, snap tiling, and moving a window across workspaces) and the task-switch stepping actions depend on implicit runtime state (the active window or an ongoing Alt-Tab-like sequence) and are not exposed here; they remain available only as keyboard or gesture shortcuts registered through treeland_shortcut_manager_v3. Exposing those window-level actions as a directly callable interface would let a background client manipulate a window chosen by keyboard focus rather than by explicit reference, which is the same reason KWin keeps them behind kglobalaccel instead of offering them on its DBus interface.
The compositor must reject bind attempts from non-privileged clients.
This interface is stateless: each request is an independent one-shot action. The compositor does not send events in response to these requests; clients that need to observe the resulting session state should use the appropriate session or idle protocols instead.
The terms "must", "must not", "should", and "may" in this document are to be interpreted as described in RFC 2119.
treeland_compositor_action_unstable_v1
treeland_compositor_action_v1
- action — compositor actions
- destroy — destroy the compositor action object
- trigger — trigger a compositor action
compositor action trigger
A global that exposes compositor actions to a privileged DDE client.
The compositor must reject bind attempts from non-privileged clients.
Only window-independent actions are exposed here; actions that target the currently active window or step an in-progress task switch are not part of this interface and must be triggered as shortcuts through treeland_shortcut_manager_v3. See the protocol-level description for the rationale.
All actions are triggered with the trigger request, which takes an action argument.
The compositor should ignore an action it cannot perform, for example locking while a lock screen is already active; clients must not assume an action has taken effect.
The shutdown-menu actions show the shutdown and session menu; they differ only in which menu button receives the default keyboard focus. shutdown_menu expresses no preference; the power_off, reboot, suspend, hibernate, and log_out entries request focus on the matching button. Showing the menu does not perform the power action itself; the compositor or greeter carries out the chosen action after the user confirms.