input: Fix surpressed_keys logic

This commit is contained in:
Victoria Brekenfeld 2024-07-17 21:07:38 +02:00
parent d4926c3a9e
commit 4b2082f72a

View file

@ -102,16 +102,17 @@ impl SupressedKeys {
.partition(|(key, _)| *key == keysym.raw_code()); .partition(|(key, _)| *key == keysym.raw_code());
*keys = remaining; *keys = remaining;
let removed = removed if removed.is_empty() {
return None;
}
Some(
removed
.into_iter() .into_iter()
.map(|(_, token)| token) .map(|(_, token)| token)
.flatten() .flatten()
.collect::<Vec<_>>(); .collect::<Vec<_>>(),
if removed.is_empty() { )
None
} else {
Some(removed)
}
} }
} }