-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(macos): add Reopen event, closes #218 #517
Conversation
Are there any plans on merging this? |
We plan to switch to winit as #470 described. So winit also needs to implement this one. |
last time I checked, the winit team has not decided on how they want to introduce this so I think we should keep this open until we make the switch. |
@wusyong By switching you mean that |
We plan to do so in v2.0. If it's not that urgent, I suppose open a PR on winit is a good start. |
@wusyong Ok got it. Makes sense. But is there a way currently in tauri to handle this issue tauri-apps/tauri#3084 (opening a window on dock icon click)? |
I don't think so until this PR is merged in winit. |
Use minimized windows instead of hide. tauri::Builder::default()
.on_window_event(|event| {
if let tauri::WindowEvent::CloseRequested { api, .. } = event.event() {
// event.window().hide().unwrap();
event.window().minimize().unwrap();
api.prevent_close();
}
}) |
Would love to see this in the next version of Tauri. Missing this functionality. Great work. |
Thanks @BillGoldenWater for your work and sorry for the very long delay, do you plan to work on adding this event to tauri? |
yes |
Thank you 🙏 |
Really looking forward that! |
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information
in macOS the app usually doesn't exit when all window closed, and will use click on dock icon for reopen window.
https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428638-applicationshouldhandlereopen?language=objc
this is a recreate of pr #515, due to it's not signed because misconfiguration in git