This commit is contained in:
buffet 2019-01-09 10:25:49 +01:00
parent 113bfb5be0
commit 39364c0234

View file

@ -16,13 +16,15 @@ impl input::keyboard::Handler for Keyboard {
for key in key_event.pressed_keys() { for key in key_event.pressed_keys() {
match key { match key {
keysyms::KEY_Escape => compositor::terminate(), keysyms::KEY_Escape => compositor::terminate(),
keysyms::KEY_XF86Switch_VT_1 ..= keysyms::KEY_XF86Switch_VT_12 => { keysyms::KEY_XF86Switch_VT_1..=keysyms::KEY_XF86Switch_VT_12 => {
compositor_handle.run(|compositor| { compositor_handle
let backend = compositor.backend_mut(); .run(|compositor| {
if let Some(mut session) = backend.get_session() { let backend = compositor.backend_mut();
session.change_vt(key - keysyms::KEY_XF86Switch_VT_1 + 1); if let Some(mut session) = backend.get_session() {
} session.change_vt(key - keysyms::KEY_XF86Switch_VT_1 + 1);
}).unwrap(); }
})
.unwrap();
} }
_ => {} _ => {}
} }