fix x11 login screen

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-04-01 10:26:55 +08:00
parent 2ba7be5cdd
commit 3ab73bdf36
2 changed files with 12 additions and 3 deletions

View File

@@ -40,6 +40,12 @@ pub fn is_desktop_wayland() -> bool {
get_display_server() == DISPLAY_SERVER_WAYLAND
}
#[inline]
pub fn is_x11_wayland() -> bool {
let ds = get_display_server();
ds == DISPLAY_SERVER_X11 || ds == DISPLAY_SERVER_WAYLAND
}
#[inline]
pub fn is_x11_or_headless() -> bool {
!is_desktop_wayland()