Skip to content

Conversation

@luoffei
Copy link

@luoffei luoffei commented Nov 2, 2024

Added event::ExitRequested handle for dock icon exit on macOS.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2024

Package Changes Through 30ec159

There are 1 changes which include tao with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tao 0.30.5 0.31.0

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
Copy link
Member

@amrbashir amrbashir Nov 4, 2024

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.

Copy link
Author

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.

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants