//! Winit's Wayland backend. pub use event_loop::{ActiveEventLoop, EventLoop}; pub use output::MonitorHandle; use sctk::reexports::client::protocol::wl_surface::WlSurface; use sctk::reexports::client::Proxy; pub use window::Window; pub(super) use crate::cursor::OnlyCursorImage as CustomCursor; use crate::dpi::{LogicalSize, PhysicalSize}; use crate::window::WindowId; mod event_loop; mod output; mod seat; mod state; mod types; mod window; /// Get the WindowId out of the surface. #[inline] fn make_wid(surface: &WlSurface) -> WindowId { WindowId::from_raw(surface.id().as_ptr() as usize) } /// The default routine does floor, but we need round on Wayland. fn logical_to_physical_rounded(size: LogicalSize, scale_factor: f64) -> PhysicalSize { let width = size.width as f64 * scale_factor; let height = size.height as f64 * scale_factor; (width.round(), height.round()).into() }