From a91508672e2beecffd065984c94d9d493b3eaf4e Mon Sep 17 00:00:00 2001 From: Naman Agrawal Date: Thu, 28 Aug 2025 11:21:16 +0530 Subject: [PATCH] cleanup: add session lock import to prelude - Add `SessionLockWindow` and `SessionLockEvent` to `bevy_wayland::prelude::*` --- examples/session_lock.rs | 11 ++--------- src/lib.rs | 5 +++-- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/examples/session_lock.rs b/examples/session_lock.rs index 7c5051b..cc34791 100644 --- a/examples/session_lock.rs +++ b/examples/session_lock.rs @@ -1,16 +1,9 @@ -use std::time::Duration; - use bevy::{ - color::palettes::basic::*, prelude::*, - window::{exit_on_all_closed, WindowCreated, WindowRef, WindowResolution}, + window::{exit_on_all_closed, WindowRef}, winit::WinitPlugin, }; -use bevy_wayland::{ - layer_shell::LayerShellSettings, - session_lock::{SessionLockEvent, SessionLockWindow}, - WaylandPlugin, -}; +use bevy_wayland::prelude::*; use smithay_client_toolkit::shell::wlr_layer::{Anchor, Layer}; const NORMAL_BUTTON: Color = Color::srgb(0.15, 0.15, 0.15); diff --git a/src/lib.rs b/src/lib.rs index 99a278d..8440d96 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,7 +5,7 @@ use smithay_client_toolkit::{ reexports::{ calloop::EventLoop, calloop_wayland_source::WaylandSource, - client::{Connection, globals::registry_queue_init}, + client::{globals::registry_queue_init, Connection}, }, registry::{ProvidesRegistryState, RegistryState}, registry_handlers, @@ -20,9 +20,10 @@ pub mod session_lock; mod surface_handler; pub mod prelude { - pub use crate::WaylandPlugin; pub use crate::input_region::InputRegion; pub use crate::layer_shell::{LayerShellSettings, LayerShellWindowSize}; + pub use crate::session_lock::{SessionLockEvent, SessionLockWindow}; + pub use crate::WaylandPlugin; pub use smithay_client_toolkit::shell::wlr_layer::{Anchor, KeyboardInteractivity, Layer}; }