[desktop/tauri] Fix windows slplash screen close crash

This commit is contained in:
Vladimir Stoilov 2024-05-30 10:18:51 +03:00
parent 917560ae2f
commit ce43e2a81f
No known key found for this signature in database
GPG key ID: 2F190B67A43A81AF
4 changed files with 101 additions and 2 deletions

File diff suppressed because one or more lines are too long

View file

@ -168,6 +168,13 @@
"shell:allow-open"
]
},
{
"description": "shell:allow-spawn -> Enables the spawn command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:allow-spawn"
]
},
{
"description": "shell:allow-stdin-write -> Enables the stdin_write command without any pre-configured scope.",
"type": "string",
@ -196,6 +203,13 @@
"shell:deny-open"
]
},
{
"description": "shell:deny-spawn -> Denies the spawn command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:deny-spawn"
]
},
{
"description": "shell:deny-stdin-write -> Denies the stdin_write command without any pre-configured scope.",
"type": "string",
@ -631,6 +645,27 @@
"image:deny-size"
]
},
{
"description": "log:default -> Allows the log command",
"type": "string",
"enum": [
"log:default"
]
},
{
"description": "log:allow-log -> Enables the log command without any pre-configured scope.",
"type": "string",
"enum": [
"log:allow-log"
]
},
{
"description": "log:deny-log -> Denies the log command without any pre-configured scope.",
"type": "string",
"enum": [
"log:deny-log"
]
},
{
"description": "menu:default -> Default permissions for the plugin.",
"type": "string",
@ -1280,6 +1315,13 @@
"shell:allow-open"
]
},
{
"description": "shell:allow-spawn -> Enables the spawn command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:allow-spawn"
]
},
{
"description": "shell:allow-stdin-write -> Enables the stdin_write command without any pre-configured scope.",
"type": "string",
@ -1308,6 +1350,13 @@
"shell:deny-open"
]
},
{
"description": "shell:deny-spawn -> Denies the spawn command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:deny-spawn"
]
},
{
"description": "shell:deny-stdin-write -> Denies the stdin_write command without any pre-configured scope.",
"type": "string",

View file

@ -168,6 +168,13 @@
"shell:allow-open"
]
},
{
"description": "shell:allow-spawn -> Enables the spawn command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:allow-spawn"
]
},
{
"description": "shell:allow-stdin-write -> Enables the stdin_write command without any pre-configured scope.",
"type": "string",
@ -196,6 +203,13 @@
"shell:deny-open"
]
},
{
"description": "shell:deny-spawn -> Denies the spawn command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:deny-spawn"
]
},
{
"description": "shell:deny-stdin-write -> Denies the stdin_write command without any pre-configured scope.",
"type": "string",
@ -631,6 +645,27 @@
"image:deny-size"
]
},
{
"description": "log:default -> Allows the log command",
"type": "string",
"enum": [
"log:default"
]
},
{
"description": "log:allow-log -> Enables the log command without any pre-configured scope.",
"type": "string",
"enum": [
"log:allow-log"
]
},
{
"description": "log:deny-log -> Denies the log command without any pre-configured scope.",
"type": "string",
"enum": [
"log:deny-log"
]
},
{
"description": "menu:default -> Default permissions for the plugin.",
"type": "string",
@ -1280,6 +1315,13 @@
"shell:allow-open"
]
},
{
"description": "shell:allow-spawn -> Enables the spawn command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:allow-spawn"
]
},
{
"description": "shell:allow-stdin-write -> Enables the stdin_write command without any pre-configured scope.",
"type": "string",
@ -1308,6 +1350,13 @@
"shell:deny-open"
]
},
{
"description": "shell:deny-spawn -> Denies the spawn command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:deny-spawn"
]
},
{
"description": "shell:deny-stdin-write -> Denies the stdin_write command without any pre-configured scope.",
"type": "string",

View file

@ -22,6 +22,7 @@ pub fn create_main_window(app: &AppHandle) -> Result<WebviewWindow> {
debug!("[tauri] creating main window");
let res = WebviewWindowBuilder::new(app, "main", WebviewUrl::App("index.html".into()))
.title("Portmaster")
.visible(false)
.build();
@ -79,7 +80,7 @@ pub fn create_splash_window(app: &AppHandle) -> Result<WebviewWindow> {
pub fn close_splash_window(app: &AppHandle) -> Result<()> {
if let Some(window) = app.get_webview_window("splash") {
return window.close();
return window.hide();
}
return Err(tauri::Error::WindowNotFound);
}