From 58171998a3ccece6e06888c079bd2fb649cfba19 Mon Sep 17 00:00:00 2001 From: alimy Date: Fri, 17 Jun 2022 12:10:27 +0800 Subject: [PATCH] desktop/tauri: optimize disable resizable transparent window and enable setfullscreen on macos --- web/src-tauri/Cargo.toml | 2 +- web/src-tauri/tauri.conf.json | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/web/src-tauri/Cargo.toml b/web/src-tauri/Cargo.toml index fc3f3b76..460c9807 100644 --- a/web/src-tauri/Cargo.toml +++ b/web/src-tauri/Cargo.toml @@ -12,7 +12,7 @@ rust-version = "1.57" tauri-build = { version = "1.0", features = [] } [dependencies] -tauri = { version = "1.0", features = ["api-all"] } +tauri = { version = "1.0", features = ["api-all", "macos-private-api"] } [features] # by default Tauri runs in production mode diff --git a/web/src-tauri/tauri.conf.json b/web/src-tauri/tauri.conf.json index 934851af..cb0df561 100644 --- a/web/src-tauri/tauri.conf.json +++ b/web/src-tauri/tauri.conf.json @@ -10,6 +10,7 @@ "withGlobalTauri": true }, "tauri": { + "macOSPrivateApi": true, "bundle": { "active": true, "targets": "all", @@ -63,8 +64,10 @@ "title": "泡泡 | 一个清新文艺的微社区", "width": 1080, "height": 800, - "resizable": true, - "fullscreen": false + "resizable": false, + "fullscreen": false, + "transparent": true, + "decorations": true } ], "security": {