Open gusxodnjs opened 3 months ago
@amrbashir I'm sorry, but could you please let me know the progress on this issue? I have an important release coming up next month, and I don't even know if this issue is a bug or not. If it's not a bug, I want to know how to bypass it.
Hi, can you try if this works by handling the ExitRequest
event like in the example:
@pewsheen thanks for your comment. I've tried it and it's the same. Even in the example, it seems to be reproduced if you do the hide() instead of the destory() in the CloseRequested event. https://github.com/tauri-apps/tauri/blob/762cf31a113f33cd524c8f6fa52ca47db8ea3705/examples/api/src-tauri/src/lib.rs#L175
Usually, we'll just let the window close and recreate a new window when the user clicks the icon on the dock. Or do you have any particular use case? Otherwise, I think the code of the project may suit the scenario https://github.com/thewh1teagle/RustDuck/blob/main/src-tauri/src/runtime.rs
When I close the main window, I have to run it in the background, so I can't destroy it. When I close the main window, there's no way I can go back from background mode to foreground mode. Doesn't the tray menu disappear when I close the window? Also, since I log in from the main window, I need to stay in the window state.
So hide the main window without closing it.
In my case, when I exit the main window, the only way is turn off full screen mode is . How about this?
Describe the bug
After operating the window in full screen mode, hide the window, and run app.prevent_close(), a black screen appears to exit the window.
https://github.com/user-attachments/assets/f18099e2-c735-483d-aeb5-f871e8e73c1b
Reproduction
https://github.com/gusxodnjs/tauri-issues/tree/bug/background
Expected behavior
The window should be hidden and the desktop should be displayed.
Full
tauri info
outputStack trace
No response
Additional context
No response