[LV2] Passing ui:scaleFactor and ui:updateRate as atom messages
alex at zrythm.org
Sat May 1 11:50:21 PDT 2021
In the normal case, hosts will pass the scale factor that the host uses
to plugin UIs. The scale factor the host uses is likely taken from the
physical monitor, so if you drag the host window to another monitor,
the host will be able to automatically change its scale factor to match
that monitor. GTK supports this for example (GtkWidget has callbacks
for scale factor changes and an API to check its current scale factor).
So in the case above, when you move the plugin window to another
monitor, the host will want to change the plugin window's scale factor
to the monitor's scale factor. Unless I'm missing something, the only
way to accomplish this with the current API is to re-instantiate the
plugin and pass the new options.
While it does make sense that the plugin knows this information when it
is instantiated, wouldn't these be better suited (or at least also
possible to pass) as messages that would be sent while the plugin is
active (perhaps with an atom message)?
They are simple floats so I'm imagining doing lv2_atom_forge_key() for
each URI and then lv2_atom_forge_float() with the new value. Is this
valid with the current spec?
Related conversation with Gtk devs here:
More information about the Devel