diff --git a/src/main.rs b/src/main.rs index 9272ba2..d790d56 100644 --- a/src/main.rs +++ b/src/main.rs @@ -234,7 +234,7 @@ fn main() { let mut sleep_duration = Duration::ZERO; debug_span!("StereoKit").in_scope(|| { sk.run( - move |sk| { + |sk| { let _span = debug_span!("StereoKit step"); let _span = _span.enter(); @@ -287,6 +287,8 @@ fn main() { ) }); + #[cfg(feature = "wayland")] + drop(wayland); let _ = event_stop_tx.send(()); event_thread .join() diff --git a/src/wayland/mod.rs b/src/wayland/mod.rs index 68ef0c7..f423031 100644 --- a/src/wayland/mod.rs +++ b/src/wayland/mod.rs @@ -24,7 +24,6 @@ use smithay::backend::renderer::ImportDma; use smithay::reexports::wayland_server::backend::ClientId; use smithay::reexports::wayland_server::DisplayHandle; use smithay::reexports::wayland_server::{backend::GlobalId, Display, ListeningSocket}; -use std::mem::ManuallyDrop; use std::os::fd::OwnedFd; use std::os::unix::prelude::AsRawFd; use std::{ @@ -91,7 +90,7 @@ pub struct Wayland { dmabuf_rx: UnboundedReceiver, wayland_state: Arc>, #[cfg(feature = "xwayland")] - pub xwayland_state: ManuallyDrop, + pub xwayland_state: xwayland::XWaylandState, } impl Wayland { pub fn new() -> Result { @@ -110,7 +109,7 @@ impl Wayland { let (dmabuf_tx, dmabuf_rx) = mpsc::unbounded_channel(); let display = Arc::new(DisplayWrapper(Mutex::new(display), display_handle.clone())); #[cfg(feature = "xwayland")] - let xwayland_state = ManuallyDrop::new(xwayland::XWaylandState::create(&display_handle)?); + let xwayland_state = xwayland::XWaylandState::create(&display_handle)?; let wayland_state = WaylandState::new(display_handle, &renderer, dmabuf_tx); let (global_destroy_queue_in, global_destroy_queue) = mpsc::channel(8);