feat: support drag and remove title bar on KDE

This commit is contained in:
Kevin Yue
2023-06-25 13:36:48 +08:00
committed by Kevin Yue
parent 5bc3da99ac
commit 4191e9a19f
8 changed files with 36 additions and 9 deletions

View File

@@ -44,6 +44,18 @@ fn setup(app: &mut tauri::App) -> Result<(), Box<dyn std::error::Error>> {
});
app.manage(client);
match std::env::var("XDG_CURRENT_DESKTOP") {
Ok(desktop) => {
if desktop == "KDE" {
if let Some(main_window) = app.get_window("main") {
let _ = main_window.set_decorations(false);
}
}
}
Err(_) => (),
}
Ok(())
}

View File

@@ -68,11 +68,13 @@
},
"windows": [
{
"title": "GlobalProtect",
"label": "main",
"fullscreen": false,
"width": 260,
"height": 360,
"resizable": false,
"title": "GlobalProtect",
"width": 260
"fileDropEnabled": false
}
]
}