fix, xwayland server env, check xwayland running
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
4326bfa504
commit
bd6323ccae
@ -903,7 +903,7 @@ pub fn change_resolution_directly(name: &str, width: usize, height: usize) -> Re
|
|||||||
#[inline]
|
#[inline]
|
||||||
pub fn is_xwayland_running() -> bool {
|
pub fn is_xwayland_running() -> bool {
|
||||||
if let Ok(output) = run_cmds("pgrep -a Xwayland") {
|
if let Ok(output) = run_cmds("pgrep -a Xwayland") {
|
||||||
return !output.contains("Xwayland");
|
return output.contains("Xwayland");
|
||||||
}
|
}
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
@ -1143,7 +1143,7 @@ mod desktop {
|
|||||||
|
|
||||||
pub fn refresh(&mut self) {
|
pub fn refresh(&mut self) {
|
||||||
if !self.sid.is_empty() && is_active_and_seat0(&self.sid) {
|
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() {
|
if is_xwayland_running() && !self.is_login_wayland() {
|
||||||
self.get_display_xauth_xwayland();
|
self.get_display_xauth_xwayland();
|
||||||
self.is_rustdesk_subprocess = false;
|
self.is_rustdesk_subprocess = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user