free-audio / clap-wrapper

Wrappers for using CLAP in other plugin environments
MIT License
107 stars 17 forks source link

Allow child NSView to resize the wrapper NSView in Audio Units. #245

Closed directmusic closed 4 months ago

directmusic commented 4 months ago

I was running into an issue where my child NSView would change size and the wrapper would not update its size. This patch addresses this by checking the resize hints provided by the CLAP plugin and setting the AutoresizingMask for the wrapper NSView.

I am quite new to all of this, but my understanding is that AUv2 cannot have a resizable window. Depending on the opinion of the maintainers if you'd prefer it to be consistent with the VST3 and CLAP versions I would be happy to spend the time to implement a listener for mouse events to hittest the edges of the wrapper view to simulate this behavior.

baconpaul commented 4 months ago

Thanks. @defiantnerd and I are both a bit tied up but I’ll give it a test probably Friday and check

as to a mouse hit test I think if we did that we would want it in an off by default option since we kinda promise to not screw with the events of the underlying clap but I’m interested how you would go about it in the on case?

thank you for the contribution also!

defiantnerd commented 4 months ago

Your code looks fine, I'll try to check it out live on macOS tomorrow, too. Thanks for your contribution.

baconpaul commented 4 months ago

@defiantnerd did this get merged? or did deleting next blow up the pr?

defiantnerd commented 4 months ago

@baconpaul the rebase blew the PR obviously :/

defiantnerd commented 4 months ago

hm, this does not compute.

baconpaul commented 4 months ago

i can fix it up

defiantnerd commented 4 months ago

I've transfered it to a new PR. Thanks @directmusic