diff --git a/src-tauri/common/window.rs b/src-tauri/common/window.rs index 436647b..494da57 100644 --- a/src-tauri/common/window.rs +++ b/src-tauri/common/window.rs @@ -301,7 +301,8 @@ pub async fn open_small_window( #[cfg(target_os = "linux")] { - builder = builder.transparent(true); + // Transparent WebKitGTK windows can fail to render with Wayland DMA-BUF backends. + builder = builder.transparent(false); } let window = builder.build().map_err(|e| e.to_string())?; diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 072bcf9..09473fe 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -14,15 +14,15 @@ "windows": [ { "title": "Rclone UI", - "width": 0, - "height": 0, + "width": 1, + "height": 1, "center": true, "hiddenTitle": false, "resizable": false, "fullscreen": false, "visible": false, "decorations": false, - "focus": true, + "focus": false, "url": "tray.html", "alwaysOnTop": true, "backgroundThrottling": "disabled", diff --git a/src/pages/Startup.tsx b/src/pages/Startup.tsx index 381dfb4..399db48 100644 --- a/src/pages/Startup.tsx +++ b/src/pages/Startup.tsx @@ -84,10 +84,11 @@ export default function Startup() { }, [startupStatus]) // Close window when it loses focus + // Wayland can report a transient focus loss while the window is being shown. useEffect(() => { const currentWindow = getCurrentWindow() const unlisten = currentWindow.onFocusChanged(async ({ payload: focused }) => { - if (!focused) { + if (!focused && platform() !== 'linux') { await currentWindow.hide() await currentWindow.destroy() }