Avoid exposing mime types that couldn't be read from through clipboard

Attempts to address #27
This commit is contained in:
Shawn Wallace 2024-07-04 17:55:49 -04:00
parent 98a81c2668
commit d32eae139d
3 changed files with 193 additions and 64 deletions

View file

@ -406,11 +406,13 @@ impl XState {
}
fn get_atom_name(&self, atom: x::Atom) -> String {
self.connection
match self
.connection
.wait_for_reply(self.connection.send_request(&x::GetAtomName { atom }))
.unwrap()
.name()
.to_string()
{
Ok(reply) => reply.name().to_string(),
Err(err) => format!("<error getting atom name: {err:?}> {atom:?}"),
}
}
fn get_window_attributes(&self, window: x::Window) -> XResult<WindowAttributes> {