File tree 1 file changed +7
-1
lines changed
desktop/tauri/src-tauri/src
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ use portmaster::PortmasterExt;
24
24
use tauri_plugin_log:: RotationStrategy ;
25
25
use traymenu:: setup_tray_menu;
26
26
use window:: { close_splash_window, create_main_window, hide_splash_window} ;
27
+ use tauri_plugin_window_state:: StateFlags ;
27
28
28
29
#[ macro_use]
29
30
extern crate lazy_static;
@@ -164,7 +165,12 @@ fn main() {
164
165
// OS Version and Architecture support
165
166
. plugin ( tauri_plugin_os:: init ( ) )
166
167
// Initialize save windows state plugin.
167
- . plugin ( tauri_plugin_window_state:: Builder :: default ( ) . build ( ) )
168
+ . plugin ( tauri_plugin_window_state:: Builder :: default ( )
169
+ // Don't save visibility state, so it will not interfere with "--background" command line argument
170
+ . with_state_flags ( StateFlags :: all ( ) & !StateFlags :: VISIBLE )
171
+ // Don't save splash window state
172
+ . with_denylist ( & [ "splash" , ] )
173
+ . build ( ) )
168
174
// Single instance guard
169
175
. plugin ( tauri_plugin_single_instance:: init ( |app, argv, cwd| {
170
176
// Send info to already dunning instance.
You can’t perform that action at this time.
0 commit comments