feat: add feature to create session lock surfaces.

- Allow users to create session lock surfaces by passing an event
`SessionLockEvent::Lock` and unlock them using
`SessionLockEvent::Unlock`.
- Other surfaces of the application should be destroyed before the
session lock is aquired. The wayland client is only allowed to render to
the lock surfaces while the lock is active.
This commit is contained in:
Naman Agrawal
2025-08-28 11:11:48 +05:30
parent fc96e7a8ac
commit 3259ef0d53
3 changed files with 371 additions and 1 deletions
+3 -1
View File
@@ -16,6 +16,7 @@ mod input_handler;
pub mod input_region;
pub mod layer_shell;
mod output_handler;
pub mod session_lock;
mod surface_handler;
#[derive(Default)]
@@ -42,9 +43,10 @@ impl Plugin for WaylandPlugin {
app.add_plugins((
output_handler::OutputHandlerPlugin,
input_handler::InputHandlerPlugin,
surface_handler::SurfaceHandlerPlugin,
input_handler::InputHandlerPlugin,
layer_shell::LayerShellPlugin,
session_lock::SessionLockPlugin,
input_region::InputRegionPlugin,
));
app.set_runner(|app| runner(app, event_loop));