client: addressed unsafe block
This commit is contained in:
parent
6194848b0e
commit
35196ee8f3
@ -23,18 +23,6 @@ fn ensure_runtime_dir() {
|
||||
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
async fn main() -> Result<()> {
|
||||
// Prefer X11/Xwayland on KDE Wayland so wmctrl-based placement works
|
||||
if env::var_os("WAYLAND_DISPLAY").is_some() {
|
||||
if let Some(desktop) = env::var_os("XDG_CURRENT_DESKTOP") {
|
||||
if desktop.to_string_lossy().to_ascii_lowercase().contains("kde") {
|
||||
unsafe {
|
||||
env::set_var("GDK_BACKEND", "x11");
|
||||
env::set_var("WINIT_UNIX_BACKEND", "x11");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ensure_runtime_dir();
|
||||
|
||||
/*------------- common filter & stderr layer ------------------------*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user