feat(core): wire up alternative x11 backend
This commit is contained in:
parent
e7e7d83885
commit
d806d419c0
|
@ -143,6 +143,7 @@ impl<'a> super::engine::dispatch::executor::clipboard_injector::ClipboardParamsP
|
||||||
restore_clipboard: active.preserve_clipboard(),
|
restore_clipboard: active.preserve_clipboard(),
|
||||||
restore_clipboard_delay: active.restore_clipboard_delay(),
|
restore_clipboard_delay: active.restore_clipboard_delay(),
|
||||||
x11_use_xclip_backend: active.x11_use_xclip_backend(),
|
x11_use_xclip_backend: active.x11_use_xclip_backend(),
|
||||||
|
x11_use_xdotool_backend: active.x11_use_xdotool_backend(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -164,6 +165,7 @@ impl<'a> super::engine::dispatch::executor::InjectParamsProvider for ConfigManag
|
||||||
inject_delay: active.inject_delay(),
|
inject_delay: active.inject_delay(),
|
||||||
key_delay: active.key_delay(),
|
key_delay: active.key_delay(),
|
||||||
evdev_modifier_delay: active.evdev_modifier_delay(),
|
evdev_modifier_delay: active.evdev_modifier_delay(),
|
||||||
|
x11_use_xdotool_backend: active.x11_use_xdotool_backend(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,7 @@ pub struct ClipboardParams {
|
||||||
pub restore_clipboard: bool,
|
pub restore_clipboard: bool,
|
||||||
pub restore_clipboard_delay: usize,
|
pub restore_clipboard_delay: usize,
|
||||||
pub x11_use_xclip_backend: bool,
|
pub x11_use_xclip_backend: bool,
|
||||||
|
pub x11_use_xdotool_backend: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct ClipboardInjectorAdapter<'a> {
|
pub struct ClipboardInjectorAdapter<'a> {
|
||||||
|
@ -95,6 +96,7 @@ impl<'a> ClipboardInjectorAdapter<'a> {
|
||||||
InjectionOptions {
|
InjectionOptions {
|
||||||
delay: params.paste_shortcut_event_delay as i32,
|
delay: params.paste_shortcut_event_delay as i32,
|
||||||
disable_fast_inject: params.disable_x11_fast_inject,
|
disable_fast_inject: params.disable_x11_fast_inject,
|
||||||
|
x11_use_xdotool_fallback: params.x11_use_xdotool_backend,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
)?;
|
)?;
|
||||||
|
|
|
@ -67,7 +67,7 @@ impl<'a> TextInjector for EventInjectorAdapter<'a> {
|
||||||
})
|
})
|
||||||
.try_into()
|
.try_into()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
x11_use_xdotool_fallback: true, // TODO: put actual config
|
x11_use_xdotool_fallback: params.x11_use_xdotool_backend,
|
||||||
};
|
};
|
||||||
|
|
||||||
// We don't use the lines() method because it skips emtpy lines, which is not what we want.
|
// We don't use the lines() method because it skips emtpy lines, which is not what we want.
|
||||||
|
|
|
@ -59,7 +59,7 @@ impl<'a> KeyInjector for KeyInjectorAdapter<'a> {
|
||||||
})
|
})
|
||||||
.try_into()
|
.try_into()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
x11_use_xdotool_fallback: true, // TODO: put actual config
|
x11_use_xdotool_fallback: params.x11_use_xdotool_backend,
|
||||||
};
|
};
|
||||||
|
|
||||||
let converted_keys: Vec<_> = keys.iter().map(convert_to_inject_key).collect();
|
let converted_keys: Vec<_> = keys.iter().map(convert_to_inject_key).collect();
|
||||||
|
|
|
@ -34,4 +34,5 @@ pub struct InjectParams {
|
||||||
pub key_delay: Option<usize>,
|
pub key_delay: Option<usize>,
|
||||||
pub disable_x11_fast_inject: bool,
|
pub disable_x11_fast_inject: bool,
|
||||||
pub evdev_modifier_delay: Option<usize>,
|
pub evdev_modifier_delay: Option<usize>,
|
||||||
|
pub x11_use_xdotool_backend: bool,
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,5 +53,6 @@ generate_patchable_config!(
|
||||||
win32_exclude_orphan_events -> bool,
|
win32_exclude_orphan_events -> bool,
|
||||||
win32_keyboard_layout_cache_interval -> i64,
|
win32_keyboard_layout_cache_interval -> i64,
|
||||||
x11_use_xclip_backend -> bool,
|
x11_use_xclip_backend -> bool,
|
||||||
|
x11_use_xdotool_backend -> bool,
|
||||||
keyboard_layout -> Option<RMLVOConfig>
|
keyboard_layout -> Option<RMLVOConfig>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user