Open oldcastlehq opened 2 years ago
is that the only VST3 plugin (via yabridge) that shows with incorrect size?
most VST3 plugins do report their intended editor window (GUI) size alright, at least the Linux native VST3 ones (I don't test any under any wine bridge, so you and Robert are to delve on that suspicion a little further, sorry)
After more digging, it seems that the issue only happens with Full Bucket plugins. I could not replicate the issue with other plugins at all.
Thanks!
Sorry. I was too fast to closed it. More digging is happening :-)
The problem is that Qtractor never even queries the editor's size. This is an excerpt from yabridge's tracing:
After that IPlugView::canResize()
(to which the plugin returned kResultFalse
) there are no more IPlugView
method calls until the editor gets closed again.
and? what do you propose?
the host (qtractor) calls IPlugView::canResize()
under IPlugFrame::resizeView()
, which is supposed to catch the intended initial size anyway... the plugin replies it cannot resize, and then qtractor (the host) makes it fixed-size forever more with the exact size given... what gives?
This plugin does not call IPlugFrame::resizeView()
however. And since Qtractor never asks the plugin how large its GUI is, the window is left at whatever the default size is.
This plugin does not call
IPlugFrame::resizeView()
however.
maybe the question is why that is the case? (most) other plugins do, only these don't? baffles me.
anyway, if the above is true, the gui is still user resizeable or it is not?
If the plugin doesn't need to resize its view, why would it need to call IPlugFrame::resizeView()
?
good call, and then, yet again, what do you propose? when do you think the host should call IPlugView::canResize()
?
or how should the host know the dang initial size anyway?
You can call IPlugView::canResize()
before or after attached()
, that shouldn't matter. But the problem here is that Qtractor enver sets the editor window's size to IPlugView::getSize()
. The correct sequence of events would be:
IPlugView::setFrame()
so the plugin can request a resize.IPlugView::isPlatformTypeSupported()
to check if the plugin supports X11 GUIs.IPlugViewContentScale::setContentScale()
, if Qtractor handles HiDPI and the plugin supports it.IPlugView::getSize()
and resizes its own window accordingly. This returned size is already multiplied by the content scale factor.IPlugView::attached()
to allow the plugin to embed itself itself in the editor window.IPlugView::onSize()
with the size it has resized its editor window to.IPlugView::canResize()
(can also do this before creating the window at all, but just like getSize()
there may be one or two plugins that report the incorrect value before the attached()
call. If the plugin returns kResultOk
, make the editor window resizable and call IPlugView::checkSizeConstraint()
followed by a window resize and IPlugView::onSize()
if the plugin accepts the new size whenever the window is being resized.IPlugFrame::resizeView()
, resize the window to that new size and call IPlugView::onSize()
with the new size. Keep track of the current size to prevent sending this size twice since resizing the window would also trigger the behavior from 9).@robbert-vdh really appreciated, wholly thanks for the extensive explanation
unfortunately this isn't going to fly any day soon, at least from my keyboard, sorry (truth is, I don't feel the need, as said, most of VST3 plugins I love do work the way it is now; so why bother?)
let there be no restraints whatsoever for an incoming PR ntl. :) cheers
ps. fwiw. qtractor does all of the above in that sequence, but steps 4 and 5. -- mind you, the call to IPlugFrame::resizeView()
(step 10) is always expected to occur under the auspices to IPlugView::attached()
(step 6): a plugin failing to do so or never calling it might be the reason for the OP behavior -- so maybe a PR should probably focus on introducing step 5.
please check whether df98d329 goes any better
That indeed fixes the issue with Whispair, Kontakt, and the other plugins that were affected by this!
Hi Rui,
I noticed that the plugin https://www.fullbucket.de/music/whispair.html have window sizing issue (this is a Windows plugin, and I'm using Yabridge to run it on Linux).
The plugin offers a VST2 version, which works fine. So, Robbert (Yabridge's author) suspected that Qtractor does not ask the plugin (VST3) for its size at all, so the window does not have the correct size. So, it's a problem only for VST3 plugins.