temp commit

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-03-30 18:16:48 +08:00
parent 34c3615320
commit d82d2471d7
7 changed files with 71 additions and 26 deletions

View File

@@ -511,11 +511,13 @@ pub fn get_error() -> String {
#[cfg(not(any(feature = "cli")))]
#[cfg(target_os = "linux")]
{
let dtype = crate::platform::linux::get_display_server();
if "wayland" == dtype {
let (username, dtype) = crate::platform::linux::get_user_and_display_server();
if crate::platform::linux::DISPLAY_SERVER_WAYLAND == dtype
&& !crate::platform::linux::is_gdm_user(&username)
{
return crate::server::wayland::common_get_error();
}
if dtype != "x11" {
if dtype != crate::platform::linux::DISPLAY_SERVER_X11 {
return format!(
"{} {}, {}",
crate::client::translate("Unsupported display server".to_owned()),