On-the-fly DPI changes support?
Hi!
Playing around with reaper I found that system dpi settings are only applied when the plugin gui is first opened. That matches the description over here https://github.com/free-audio/clap/blob/main/include/clap/ext/gui.h, so i guess that's the way it's supposed to work.
The way vst3 does it is to notify the plugin each time the system DPI changes. For single monitor setups that's not a big deal, but for multiple monitors with different DPI scaling on each one I think it's definately valuable. Prevents the user from having the close and reopen the plugin gui when dragging between monitors. Would it be possible to add this feature?
Shouldn't this be handled by calling set_scale() again, when the window API changes the underlying resolution of its canvas/whatever?
APIs like Cocoa shouldn't use .set_scale() anyway (since they work in logical pixels), and I'd expect those to have some way for you to listen yourself (e.g. I found NSViewLayerContentScaleDelegate, although it's not immediately obvious how you'd hook it up)
I agree with @geraintluff - hosts should call set_scale whenever they need.
Vote to close, since if hosts aren't calling .set_scale(), that's not a CLAP standard issue?
I would close it once we add to the comments that hosts can call set scale on running plugins again if dpi changes hrs