COSMIC output managment

wlr-output-management 的扩展协议

此协议作为 wlr-output-management 的扩展。

它主要添加了显式输出镜像功能,同时上游正在研究如何最好地支持此功能。

它针对 wlr-output-management 版本 4 设计,但尽力保持前向兼容性。

输出配置管理器

此接口为 wlr-output-management 类型提供扩展点。

获取现有 zwlr_output_head_v1 的 zcosmic_output_head_v1

获取 zwlr_output_head_v1 的扩展对象。

一旦扩展输出被创建,事件将被分发,随后向匹配的 'zwlr_output_manager_v1' 传递一个伴随的 'done' 事件。

任何进一步的更新将产生新事件,如果 zcosmic_output_head_v1 的属性发生变化,就像原始的 'zwlr_output_head_v1' 一样。事件应被视为原子的,如 'zwlr_output_manager_v1::done' 所示。

尝试为每个 zwlr_output_head_v1 创建多个 zcosmic_output_head_v1 将引发 "already_extended" 错误。

获取现有 zwlr_output_configuration_v1 的 zcosmic_output_configuration_v1

获取 zwlr_output_configuration_v1 的扩展对象。

尝试为每个 zwlr_output_configuration_v1 创建多个 zcosmic_output_configuration_v1 将引发 "already_extended" 错误。

获取现有 zwlr_output_configuration_head_v1 的 zcosmic_output_configuration_head_v1

获取 zwlr_output_configuration_head_v1 的扩展对象。

尝试为每个 zwlr_output_configuration_head_v1 创建多个 zcosmic_output_configuration_head_v1 将引发 "already_extended" 错误。

release()
销毁此全局对象

销毁此全局对象。所有先前创建的对象仍然有效。

set_xwayland_primary(head: object<zcosmic_output_head_v1>)
参数
类型
描述
headobject<zcosmic_output_head_v1>允许为空
head to be advertised as primary
将 head 设为 Xwayland 的主输出

此请求将一个 head 作为通过 randr 向 Xwayland 通告的主输出。

不必标记主 head,如果传递 'null',Xwayland 将不通告主输出。发送已禁用的 head 将被忽略以避免竞争。

error { already_extended } 
参数
描述
already_extended1
对象已被创建

输出扩展对象

zwlr_output_head_v1 的扩展。

添加额外的只读属性。

通过此接口发送的属性通过 wlr_output_manager.done 事件原子地应用。不保证属性的发送顺序。

release()
销毁输出 head

使用此请求,客户端可以告诉合成器它不再对 head 对象感兴趣。

scale_1000(scale_1000: int)
参数
类型
描述
scale_1000int
当前缩放比例

此事件描述 head 在全局合成器空间中的缩放比例,乘以 1000 以获得额外精度。

仅在输出启用时发送。

mirroring(name: string)
参数
类型
描述
namestring允许为空
镜像其他输出

此事件描述 head 正在镜像另一个 head。在这种情况下,'name' 包含匹配的 'zwlr_output_head_v1' 的唯一名称。如果名称为 null,则没有 head 被镜像到此 head 上。

对于镜像的 head,'position' 事件无意义。

仅在输出启用时发送。

此 head 是否支持 adaptive_sync

此事件描述此 head 是否支持 adaptive_sync。

仅在输出启用时发送。

当前 adaptive_sync 状态

此事件描述此 head 的 adaptive_sync 状态。

仅在输出启用时发送。

xwayland_primary(state: uint)
参数
类型
描述
stateuint
boolean if primary or not
此 head 是否被配置为 Xwayland 的主输出

此事件描述此 head 是否作为通过 randr 向 Xwayland 通告的主输出。

最多一个输出被标记为主输出,但不保证任何输出被标记。 仅在输出启用时发送。

adaptive_sync_availability { unsupported, requires_modeset, supported } 
参数
描述
unsupported0
不支持 adaptive sync
requires_modeset1
自动 adaptive sync 不可用
supported2
在所有状态下都支持 adaptive sync
adaptive_sync_state_ext { disabled, automatic, always } 
参数
描述
disabled0
adaptive sync 已禁用
automatic1
adaptive sync 将自动激活
always2
adaptive sync 被强制始终激活

输出配置扩展对象

zwlr_output_configuration_v1 的扩展。

添加要通过原始 zwlr_output_configuration_v1 测试/应用的附加参数。

参数
类型
描述
idnew_id<zwlr_output_configuration_head_v1>
a new object to configure the head
headobject<zwlr_output_head_v1>
the head to be enabled
mirroringobject<zwlr_output_head_v1>
the head to be mirrored
启用并配置 head 以镜像另一个 head

启用一个 head 镜像另一个 head。

此请求创建一个 head 配置对象,可用于更改 head 的属性。

这是 'zwlr_output_configuration_v1::enable_head' 或 'zwlr_output_configuration_v1::disable_head' 的替代方案。使用相同的 'head' 参数调用任一方法将在原始 'zwlr_output_configuration_v1' 对象上引发 'already_configured_head' 错误。

客户端仍然需要按照原始协议中所述将所有属性设置到生成的 'zwlr_output_configuration_head' 上。但某些属性如 'set_position' 在镜像配置中可能会被忽略。

尝试将已禁用或正在镜像的 head 设为 'mirroring',或在将 head 用作 'mirroring' 参数后调用 'disable_head'/'mirror_head',将引发 'mirrored_head_busy' 协议错误。

release()
销毁输出配置

使用此请求,客户端可以告诉合成器它不再使用配置对象。对输出的任何更改仍将附加到原始 'zwlr_output_configuration_head_v1'(如果它未被销毁)。

finished()
配置已被使用

此事件表示配置不再可用。

这通常在原始配置被 'cancelled'、'succeeded' 或 'failed' 时发生。

收到此事件后,客户端应销毁此对象。

配置对象变为惰性,除 'destroy' 外的任何请求都将被忽略。

参数
描述
already_finished1
底层配置已被使用
mirrored_head_busy2
镜像的 head 未启用

输出配置 head 扩展对象

zwlr_output_configuration_head_v1 的扩展。

向原始 zwlr_output_configuration_head_v1 添加附加/替代参数。

一旦原始 'zwlr_output_configuration_head_v1' 被销毁,此对象将变为惰性,除 'release' 外的所有请求将被忽略。

set_scale_1000(scale_1000: int)
参数
类型
描述
scale_1000int
设置乘以 1000 的缩放比例

此请求设置 head 的缩放比例乘以 1000 以获得额外精度。

此请求旨在替代 'zwlr_output_configuration_head_v1::set_scale'。同时使用 'set_scale' 和 'set_scale_1000' 将在原始 'zwlr_output_configuration_head_v1' 上引发 'already_set' 错误。

与 'set_scale' 冲突的任何请求也将与 'set_scale_1000' 冲突。

release()
销毁输出配置 head

使用此请求,客户端可以告诉合成器它不再使用配置对象。已发出的请求仍将附加到原始 'zwlr_output_configuration_head_v1',直到它被销毁。

设置 adaptive sync 状态

此请求请求新的 adaptive sync 状态。

此请求旨在替代 'zwlr_output_configuration_head_v1::set_adaptive_sync'。同时使用 'set_adaptive_sync' 和 'set_adaptive_sync_ext' 将在原始 'zwlr_output_configuration_head_v1' 上引发 'already_set' 错误。

与 'set_adaptive_sync' 冲突的任何请求也将与 'set_adaptive_sync_ext' 冲突。


合成器支持

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
zcosmic_output_manager_v1
x
3
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x

Copyright © 2024 Victoria Brekenfeld

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Footer

© 2026 Wayland Explorer

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

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