remove Fix x11

This commit is contained in:
rustdesk 2022-06-03 10:31:53 +08:00
parent c80e2204d9
commit ad22101067
3 changed files with 8 additions and 6 deletions

View File

@ -405,6 +405,7 @@ pub fn is_login_wayland() -> bool {
}
}
/*
pub fn fix_login_wayland() {
let mut file = "/etc/gdm3/custom.conf".to_owned();
if !std::path::Path::new(&file).exists() {
@ -430,12 +431,14 @@ pub fn fix_login_wayland() {
}
}
}
*/
pub fn current_is_wayland() -> bool {
let dtype = get_display_server();
return "wayland" == dtype && unsafe { UNMODIFIED };
}
/*
pub fn modify_default_login() -> String {
let dsession = std::env::var("DESKTOP_SESSION").unwrap();
let user_name = std::env::var("USERNAME").unwrap();
@ -502,6 +505,7 @@ pub fn modify_default_login() -> String {
}
return "Fix failed! Please re-login with X server manually".to_owned();
}
*/
// to-do: test the other display manager
fn _get_display_manager() -> String {

View File

@ -3,8 +3,6 @@ mod cm;
mod inline;
#[cfg(target_os = "macos")]
mod macos;
#[cfg(target_os = "windows")]
pub mod win_privacy;
pub mod remote;
use crate::common::SOFTWARE_UPDATE_URL;
use crate::ipc;
@ -609,8 +607,10 @@ impl UI {
}
fn fix_login_wayland(&mut self) {
/*
#[cfg(target_os = "linux")]
crate::platform::linux::fix_login_wayland();
*/
}
fn current_is_wayland(&mut self) -> bool {
@ -621,8 +621,10 @@ impl UI {
}
fn modify_default_login(&mut self) -> String {
/*
#[cfg(target_os = "linux")]
return crate::platform::linux::modify_default_login();
*/
#[cfg(not(target_os = "linux"))]
return "".to_owned();
}

View File

@ -666,9 +666,7 @@ class FixWayland: Reactor.Component {
return <div .trust-me>
<div>{translate('Warning')}</div>
<div>{translate('Login screen using Wayland is not supported')}</div>
<div #fix-wayland .link>{translate('Fix it')}</div>
<div #help-me .link>{translate('Help')}</div>
<div>({translate('Reboot required')})</div>
</div>;
}
@ -687,9 +685,7 @@ class ModifyDefaultLogin: Reactor.Component {
return <div .trust-me>
<div>{translate('Warning')}</div>
<div>{translate('Current Wayland display server is not supported')}</div>
<div #modify-default-login .link>{translate('Fix it')}</div>
<div #help-me .link>{translate('Help')}</div>
<div>({translate('Reboot required')})</div>
</div>;
}