-
-
Notifications
You must be signed in to change notification settings - Fork 199
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 ExitRequested event #1003
base: dev
Are you sure you want to change the base?
Conversation
Package Changes Through 30ec159There are 1 changes which include tao with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
trace!("Triggered `applicationShouldTerminate`"); | ||
AppState::should_exit(); | ||
trace!("Completed `applicationShouldTerminate`"); | ||
NS_TERMINATE_LATER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, this will cause the application to never quit unless the event loop is changed programatically.
I see that in the associated tauri PR, you call replyToApplicationShouldTerminate
which is fine I guess but the default behavior here should return NS_TERMINATE_NOW
and need a way for that to be overridden.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't think of a good way to handle this problem.
Is it possible to transplant the processing method in tauri to tao? By default, NSTerminateLater
is returned. If the user does not handle the event, reply to exit. Otherwise, reply, terminate or cancel according to the user's processing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a similar mechanism used when ScaleFactorChanged event is fired.
Added
event::ExitRequested
handle for dock icon exit on macOS.