服务端窗口装饰管理器

此接口允许协调服务器是否应在代表 shell surface(wl_shell_surface 或类似物)的 wl_surface 周围创建服务端窗口装饰。通过通告对此接口的支持,服务器表明它支持服务端装饰。

与 zxdg_decoration_manager_v1 一起使用时行为未定义。

参数
类型
描述
idnew_id<org_kde_kwin_server_decoration>
surfaceobject<wl_surface>
为给定 surface 创建服务端装饰对象

当客户端创建服务端装饰对象时,表明它支持该协议。客户端应告知服务器它是否需要服务端装饰,或者将提供客户端装饰。

如果客户端没有为 surface 创建服务端装饰对象,服务器会将其解释为缺乏对该协议的支持,并将其视为客户端装饰。尽管如此,客户端装饰的 surface 仍应使用此协议向服务器表明它不需要服务端装饰。

default_mode(mode: uint)
参数
类型
描述
modeuint
The default decoration mode applied to newly created server decorations.
服务器使用的默认模式

此事件在绑定接口后立即发出。它包含装饰的默认模式。当创建新的服务端装饰对象时,该新对象将处于默认模式,直到第一个 request_mode 被请求。

服务器可以随时更改默认模式。

mode { None, Client, Server } 
参数
描述
None0
无装饰:surface 完全不被装饰,无论是服务端还是客户端。例如不应被装饰的弹出 surface。
Client1
客户端装饰:装饰是 surface 和客户端的一部分。
Server2
服务端装饰:服务器将 surface 嵌入装饰框架中。
request_mode 和事件 mode 中使用的可能值


release()
释放服务端装饰对象
request_mode(mode: uint)
参数
类型
描述
modeuint
The mode this surface wants to use.
surface 想要使用的装饰模式
mode(mode: uint)
参数
类型
描述
modeuint
The decoration mode applied to the surface by the server.
服务器应用的新装饰模式

此事件在装饰创建后直接发出,代表服务器的基本装饰策略。例如,希望所有 surface 都使用客户端装饰的服务器将发送 Client,希望服务端装饰的服务器将发送 Server。

客户端可以通过装饰请求请求不同的模式。服务器将通过另一个具有相同模式的事件来确认这一点。因此,即使服务器偏好服务端装饰,也可以强制使用客户端装饰。

服务器可以随时发出此事件。在这种情况下,客户端可以再次请求不同的模式。服务器有责任防止反馈循环。

mode { None, Client, Server } 
参数
描述
None0
无装饰:surface 完全不被装饰,无论是服务端还是客户端。例如不应被装饰的弹出 surface。
Client1
客户端装饰:装饰是 surface 和客户端的一部分。
Server2
服务端装饰:服务器将 surface 嵌入装饰框架中。
request_mode 和事件 mode 中使用的可能值

合成器支持

Cage
Cage
0.2.0
COSMIC
COSMIC
1.0.0~beta.8
GameScope
GameScope
3.15.14
Hyprland
Hyprland
0.52.1
Jay
1.12.0
KWin
KWin
6.6
Labwc
Labwc
0.9.2
Louvre
Louvre
2.14.1
Mir
Mir
2.26
Muffin
Muffin
6.6.0
Mutter
Mutter
49.2
niri
niri
25.11
phoc
phoc
0.52
river
river
0.3.13
Sway
Sway
1.11
Treeland
Treeland
0.8.0
Wayfire
Wayfire
0.9.0
Weston
Weston
14.0.2
org_kde_kwin_server_decoration_manager
1
1
x
1
1
1
1
x
x
x
x
1
1
x
1
x
1
x

SPDX-FileCopyrightText: 2015 Martin Gräßlin

SPDX-License-Identifier: LGPL-2.1-or-later

Footer

© 2026 Wayland Explorer

本网站与 Wayland 官方项目无任何关联。网站所有内容均根据 Wayland 协议 XML 文件自动生成。

本网站使用的 Visual Studio Code - Codicons 遵循 CC BY 4.0 许可。