From bd6323ccaee854da76951c989864d58af69e8475 Mon Sep 17 00:00:00 2001 From: fufesou Date: Fri, 6 Oct 2023 23:15:51 -0500 Subject: [PATCH] fix, xwayland server env, check xwayland running Signed-off-by: fufesou --- src/platform/linux.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/linux.rs b/src/platform/linux.rs index e37e6f53c..0f926c469 100644 --- a/src/platform/linux.rs +++ b/src/platform/linux.rs @@ -903,7 +903,7 @@ pub fn change_resolution_directly(name: &str, width: usize, height: usize) -> Re #[inline] pub fn is_xwayland_running() -> bool { if let Ok(output) = run_cmds("pgrep -a Xwayland") { - return !output.contains("Xwayland"); + return output.contains("Xwayland"); } false } @@ -1143,7 +1143,7 @@ mod desktop { pub fn refresh(&mut self) { if !self.sid.is_empty() && is_active_and_seat0(&self.sid) { - // Wayland display and xauth may not be available in a short time after login. + // Xwayland display and xauth may not be available in a short time after login. if is_xwayland_running() && !self.is_login_wayland() { self.get_display_xauth_xwayland(); self.is_rustdesk_subprocess = false;