mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-16 13:40:05 +02:00
VST3: Fix broken resizing in Ardour
Adds timer_proc lambda for VST3 to check for size mismatches and trigger a new resize to correct it through eventual consistency. This is done to workaround an X11 sync issue where the plugin view would end up smaller or larger than its wrapper window. In Ardour this could result in the plugin becoming uninteractable.
This commit is contained in:
committed by
Robbert van der Helm
parent
945528cd7f
commit
604375b756
@@ -204,6 +204,15 @@ class Editor {
|
||||
*/
|
||||
void resize(uint16_t width, uint16_t height);
|
||||
|
||||
/**
|
||||
* Check if the wrapper window's actual X11 size matches the expected size.
|
||||
* Returns the expected size if there's a mismatch, or nullopt if sizes
|
||||
* match. This is used as a workaround for VST3 plugins where rapid
|
||||
* resizing during mutual recursion can cause the X11 window to get stuck
|
||||
* at an intermediate size.
|
||||
*/
|
||||
std::optional<Size> check_size_mismatch();
|
||||
|
||||
/**
|
||||
* Show the window, should be called after the plugin has embedded itself.
|
||||
* There's absolutely zero reason why this can't be done in the constructor,
|
||||
|
||||
Reference in New Issue
Block a user