-
Notifications
You must be signed in to change notification settings - Fork 57
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
defer certain events on macOS to avoid re-entrant calls #189
base: master
Are you sure you want to change the base?
Conversation
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.
Aside from a little nitpick this looks good to me. 👍
I don't have a macOS machine to test this on however, and I'm not very familiar with macOS's APIs in general yet, so I think another pair of eyes would be good to double check this. 🙂
Tested on MacOS Ventura using Reaper, and it is working great 🙂👍 |
previously, calling
window.focus()
would cause a crash in some scenarios, because certain members ofWindowState
were borrowed mutably while already being borrowed. this PR fixes the issue by deferring window focus events to be triggered before callingWindowHandler:on_frame()
.