#Tauri V2 is it possible to close (not hide) a window while keep the app running in background?
14 messages · Page 1 of 1 (latest)
Found it! Looks like the example from V1 tray works
I am not sure about the resources consumed they show the same but I am yet to try on a release build
how do I relaunch the window though? Is it possible?
after all its still consuming the same resources when closing the webview, about 20mgs, not too bad but could be better while running in background
maybe its better just to hide window
20mb is a bit much for just the rust app i think (depends on the platform maybe), but tauri apps have more than one process (for the webview) so you may be missing some.
On windows for example the rust main app is more like 5mb but all processes together ~80mb. closing all webviews will just leave the 5mb
Thanks, I'm on Linux, will check on windows, also on Linux I only find one process related to the app I am working at, maybe I need to search better to find the related webviews
search for something with webkit in its name, or localhost:1420 / tauri://localhost
can't remember what the process names were on linux but there should be at least 2 more besides the main rust one
confirmed on windows the main process is only 4mb
if you know how I can reboot the window after closing it using systemExit event let me know
idk what you mean with systemExit but if a window was completely closed you have to create a new window as if it never existed. If the window was created in tauri.conf initially then there's a helper function to re-use that: https://docs.rs/tauri/2.0.0/tauri/webview/struct.WebviewWindowBuilder.html#method.from_config