Skip to content

Commit

Permalink
window_identifier: This function can't err
Browse files Browse the repository at this point in the history
  • Loading branch information
A6GibKm committed Jun 5, 2022
1 parent ec01264 commit d46bb5d
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/window_identifier/wayland.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down Expand Up @@ -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<dyn std::error::Error>> {
exported.destroy();

Ok(())
}

0 comments on commit d46bb5d

Please sign in to comment.