fix(core): disable undo_backspace when using slow inject mode on linux

This commit is contained in:
Federico Terzi 2021-10-16 20:48:18 +02:00
parent a584ee94ec
commit 39655269c3

View File

@ -168,6 +168,13 @@ impl<'a> espanso_engine::process::UndoEnabledProvider for ConfigManager<'a> {
return false;
}
// Because we cannot filter out espanso-generated events when using the X11 record injection
// method, we need to disable undo_backspace to avoid looping (espanso picks up its own
// injections, causing the program to misbehave)
if cfg!(target_os = "linux") && self.active().disable_x11_fast_inject() {
return false;
}
self.active().undo_backspace()
}
}