baseview icon indicating copy to clipboard operation
baseview copied to clipboard

add support for Window::Focused/Unfocused events on macOS

Open httnn opened this issue 1 year ago • 1 comments

trigger WindowEvent::Focused and WindowEvent::Unfocused events when the plugin window gains/loses focus. implemented by adding observers to NSNotificationCenter::defaultCenter() that listen to NSWindowDidBecomeKeyNotification and NSWindowDidResignKeyNotification notifications on the NSViews' window.

tested and confirmed to work in Live, Bitwig, FL Studio, Reaper and AudioPluginHost.

httnn avatar Mar 19 '24 18:03 httnn

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.

httnn avatar Mar 21 '24 16:03 httnn