1
0
Fork 0
forked from wry/wry

seat: update xkb_state when keymap changes

This commit is contained in:
Julian Orth 2022-05-04 22:10:38 +02:00
parent a80c5690c8
commit 76c47c24d0
7 changed files with 123 additions and 5 deletions

View file

@ -265,7 +265,15 @@ impl WlSeatGlobal {
}
pub fn set_keymap(&self, keymap: &Rc<XkbKeymap>) {
let state = match keymap.state() {
Ok(s) => s,
Err(e) => {
log::error!("Could not create keymap state: {}", ErrorFmt(e));
return;
}
};
self.kb_map.set(keymap.clone());
*self.kb_state.borrow_mut() = state;
let bindings = self.bindings.borrow_mut();
for (id, client) in bindings.iter() {
for seat in client.values() {