Skip to content
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

Fix WindowEvent::Destroyed might fire twice on macOS #831

Merged
merged 1 commit into from
Nov 6, 2023
Merged

Conversation

wusyong
Copy link
Member

@wusyong wusyong commented Oct 27, 2023

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Checklist

  • This PR will resolve #___
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary
  • It can be built on all targets and pass CI/CD.

Other information

@wusyong wusyong requested a review from a team as a code owner October 27, 2023 14:34
@wusyong wusyong requested a review from lucasfernog October 29, 2023 09:36
autoreleasepool(move || {
ns_window.close();
let event = Event::WindowEvent {
window_id: WindowId(get_window_id(*ns_window.0)),
event: WindowEvent::Destroyed,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this event removed? is the destroyed event sent somewhere else?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a workaround we did before.
It should be sent by windowWillClose in window's delegate.

@wusyong wusyong merged commit e33104c into dev Nov 6, 2023
@wusyong wusyong deleted the fix-destroy branch November 6, 2023 03:46
@github-actions github-actions bot mentioned this pull request Nov 6, 2023
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.

3 participants