1
0
Fork 0
forked from wry/wry

config: allow destroying keymaps

This commit is contained in:
Julian Orth 2024-03-13 14:32:37 +01:00
parent 3eb0f61ec1
commit f1a3705699
4 changed files with 21 additions and 0 deletions

View file

@ -59,6 +59,15 @@ impl Keymap {
pub fn is_invalid(self) -> bool {
self == Self::INVALID
}
/// Destroys this reference to the keymap.
///
/// Seats that are currently using this keymap are unaffected.
pub fn destroy(self) {
if self.is_valid() {
get!().destroy_keymap(self);
}
}
}
/// Parses a keymap.