linux_wayland_support: dup detecting function of x11 or wayland

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-07-20 10:44:27 -07:00
parent 634cb5ef1a
commit 00dc473703
12 changed files with 130 additions and 155 deletions

View File

@@ -40,7 +40,7 @@ impl Enigo {
impl Default for Enigo {
fn default() -> Self {
Self {
is_x11: crate::linux::is_x11(),
is_x11: "x11" == hbb_common::platform::linux::get_display_server(),
uinput_keyboard: None,
uinput_mouse: None,
xdo: EnigoXdo::default(),