lsp-plugins
lsp-plugins copied to clipboard
Plugins does not restore thei size
Hi, whe you reopen a resized plugin, size is not restored. Plugin is smaller then windows container. Size is retored as soon I resize a bit the window.
Latest lsp-release on Ardour 8.6 both from proaudio repo for openSUSE.
Plugin has nothing about it's UI size. The host is responsible for managing the plugin's reparented window size. I think it is a good reason to ask @x42 about the behaviour.
It's a recent issue, so it could be related to Ardour 8.6.
I've looked the issue and found the reason why LSP plugins do not restore their size. The typical scenario is:
- Plugin creates UI and returns the window handle to the host
- Host resizes window
- Plugin receives draw event, detects that location of widgets has changed and issues window size synchronization.
- Because plugin doesn't know anything about the window has been resized by the host (no one resize event was not delivered yet to plugin), it uses it's own plugin size computed on the current window structure.
- You see the plugin that doesn't fully fit the Ardour window.
I did some code around this but the further I go the worser things become with the LV2 UI. I still consider the suil library being broken because it doesn't handle the size change of the nested window when it is needed. Look how Ardour is performing in this video:
https://www.youtube.com/watch?v=iSFl7B3itsI
I've opened ticket here: https://github.com/lv2/suil/issues/22
By the other way, other formats like VST2, VST3 and CLAP have the well-designed API to notify from the plugin side the change of the window size without any restrictions to further resize.
Thanks, it's just an annoying thing, I can deal with it (or I'll switch to vst3 version, we'll se..)
- Plugin creates UI and returns the window handle to the host
Does that window have size-constraints (XSizeHints) set?
- Host resizes window
that only happens if the plugin was previously visible. The size is restored and an X11 event is sent to the plugin. This works well for other LV2 plugins (e.g. x42-plugins, DPF based ones, guitarix)
- Because plugin doesn't know anything about the window has been resized
There this seems to be an issue with LSP. Does it not handle X11 ConfigureNotify events?
When we sync the size of window again, we still didn't reach the main event loop and didn't process any event yet.
We enter the main loop and synchronize the window size before we get the first ConfigureNotify
event.
I did the workaround for that but still the behaviour of windows in Ardour (and Jalv) are wild.
I tested the behaviour of windows in Carla, and there are no problems.
Did some tricks to restore the size properly but still having issues with host not properly reacting on the plugin's window resize. Even calling lv2ui::Resize does not help.
Should be fixed in 1.2.17.