Skip to content

Commit a7678ff

Browse files
committed
floating window caps
1 parent e8c4a44 commit a7678ff

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎apps/desktop/src-tauri/capabilities/default.json‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"$schema": "../gen/schemas/desktop-schema.json",
33
"identifier": "default",
4-
"description": "Capability for the main window",
4+
"description": "Capability for the main window and any floating-* webview spawned via floating_window_create",
55
"windows": [
6-
"main"
6+
"main",
7+
"floating-*"
78
],
89
"remote": {
910
"urls": [

‎apps/desktop/src-tauri/src/app.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ pub fn build() -> tauri::Builder<tauri::Wry> {
8181
.on_window_event(|window, event| {
8282
match event {
8383
WindowEvent::CloseRequested { api, .. } => {
84-
api.prevent_close();
8584
if window.label() == "main" {
85+
api.prevent_close();
8686
let _ = window
8787
.app_handle()
8888
.save_window_state(StateFlags::SIZE | StateFlags::POSITION);

0 commit comments

Comments
 (0)