diff --git a/src/window_identifier/wayland.rs b/src/window_identifier/wayland.rs index 3d0e0b84d..2479ad17f 100644 --- a/src/window_identifier/wayland.rs +++ b/src/window_identifier/wayland.rs @@ -46,10 +46,7 @@ impl fmt::Display for WaylandWindowIdentifier { impl Drop for WaylandWindowIdentifier { fn drop(&mut self) { - if let Err(_err) = wayland_handle_unexport(&self.exported) { - #[cfg(feature = "tracing")] - tracing::error!("Failed to unexport wayland handle {}", _err); - } + self.exported.destroy(); } } @@ -116,11 +113,3 @@ pub(super) fn wayland_handle_export_from_surface( queue.blocking_dispatch(&mut wl_handle)?; Ok((exported, wl_handle.0)) } -/// A helper to unexport a wayland handle from a previously exported one -/// -/// Needed for converting a RawWindowHandle to a WindowIdentifier -fn wayland_handle_unexport(exported: &ZxdgExportedV2) -> Result<(), Box> { - exported.destroy(); - - Ok(()) -}