Skip to content

Commit bb65355

Browse files
committed
fix: allow window-state plugin to save state on close
Remove std::process::exit(0) when hide_on_close is false. This allows tauri-plugin-window-state to properly save window position and size before the app closes. Fixes #1135
1 parent 277d146 commit bb65355

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src-tauri/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,9 @@ pub fn run_app() {
155155
window.hide().unwrap();
156156
});
157157
api.prevent_close();
158-
} else {
159-
// Exit app completely when hide_on_close is false
160-
std::process::exit(0);
161158
}
159+
// If hide_on_close is false, allow normal close behavior
160+
// This lets tauri-plugin-window-state save the window position and size
162161
}
163162
})
164163
.build(tauri::generate_context!())

0 commit comments

Comments
 (0)