-
Notifications
You must be signed in to change notification settings - Fork 60
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
add support for Window::Focused/Unfocused events on macOS #171
Conversation
there was a slight oversight where the focus events were not sent correctly if the window contained other things besides just the NSView that houses the plugin. should be fixed now though, also added some comments for clarity. |
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.
thanks for the review @glowcoil! making NSView the observer seemed to address all your comments. just a few questions here still.
trigger
WindowEvent::Focused
andWindowEvent::Unfocused
events when the plugin window gains/loses focus. implemented by adding observers toNSNotificationCenter::defaultCenter()
that listen toNSWindowDidBecomeKeyNotification
andNSWindowDidResignKeyNotification
notifications on theNSViews
' window.tested and confirmed to work in Live, Bitwig, FL Studio, Reaper and AudioPluginHost.