mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-20 19:51:04 +03:00
@@ -88,7 +88,13 @@ impl Default for Enigo {
|
||||
Self {
|
||||
is_x11,
|
||||
tfc: if is_x11 {
|
||||
Some(TFC_Context::new().expect("kbd context error"))
|
||||
match TFC_Context::new() {
|
||||
Ok(ctx) => Some(ctx),
|
||||
Err(..) => {
|
||||
println!("kbd context error");
|
||||
None
|
||||
}
|
||||
}
|
||||
} else {
|
||||
None
|
||||
},
|
||||
|
||||
@@ -391,8 +391,9 @@ impl KeyboardControllable for EnigoXdo {
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
self.key_sequence_parse_try(sequence)
|
||||
.expect("Could not parse sequence");
|
||||
if let Err(..) = self.key_sequence_parse_try(sequence) {
|
||||
println!("Could not parse sequence");
|
||||
}
|
||||
}
|
||||
|
||||
fn key_sequence_parse_try(&mut self, sequence: &str) -> Result<(), crate::dsl::ParseError>
|
||||
|
||||
Reference in New Issue
Block a user