锁定通知管理器

此接口允许客户端监控 Wayland 会话是否处于锁定或解锁状态。

destroy()
销毁管理器

销毁管理器对象。通过此接口创建的所有对象保持有效。

get_lock_notification(id: new_id<hyprland_lock_notification_v1>)
参数
类型
描述
idnew_id<hyprland_lock_notification_v1>
创建通知对象

创建一个新的锁定通知对象。

如果调用此方法时会话已锁定,将立即发送 locked 事件。


锁定通知

此接口由 compositor 用于向客户端发送锁定通知事件。

通常,当客户端通过 ext-session-lock 锁定/解锁会话时会发出 "locked" 和 "unlocked" 事件,但 compositor 可以选择为任何其他锁定机制发送通知。

compositor 必须在会话的锁定和解锁状态之间的过渡期结束后发出通知。 在 ext-session-lock 的上下文中,这意味着 "locked" 事件预期在会话锁定客户端已在每个输出上呈现锁定屏幕帧之后发送,这对应于 ext-session-lock 的 "locked" 事件。

destroy()
销毁通知对象

销毁通知对象。

locked()
会话已锁定

当 Wayland 会话被锁定时发送此事件。

如果在没有 unlock 事件介入的情况下发送此事件两次,则属于 compositor 协议错误。

unlocked()
会话不再锁定

当 Wayland 会话解锁时发送此事件。

如果在没有 locked 事件介入的情况下发送此事件两次,则属于 compositor 协议错误。在任何 locked 事件之前发送此事件也属于 compositor 协议错误。


合成器支持

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
hyprland_lock_notifier_v1
x
x
x
1
x
x
x
x
x
x
x
x
x
x
x
x
x
x

Copyright © 2025 Maximilian Seidler All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Footer

© 2026 Wayland Explorer

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

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