From f504da9e46aca0b04df21787c9c00d6fab9df555 Mon Sep 17 00:00:00 2001 From: Juuso Kaitila Date: Tue, 20 Jan 2026 18:18:36 +0200 Subject: [PATCH] VST3: Fix reparenting error when opening certain plugins Fixes an issue where reparenting fails when the initial size returned by the plugin is 0x0, i.e., invalid. --- src/wine-host/bridges/vst3.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wine-host/bridges/vst3.cpp b/src/wine-host/bridges/vst3.cpp index b48548e8..43c3cf5d 100644 --- a/src/wine-host/bridges/vst3.cpp +++ b/src/wine-host/bridges/vst3.cpp @@ -801,8 +801,13 @@ void Vst3Bridge::run() { .run_in_context([&, &instance = instance]() -> tresult { Steinberg::ViewRect size; std::optional initial_size; + // Only accept the initial size from the plugin if it's + // valid. Some plugins like Spectrasonics' Omnisphere 2 + // return 0x0 for the initial size, which breaks our + // reparenting in the editor. if (instance.plug_view_instance->plug_view->getSize( - &size) == Steinberg::kResultOk) { + &size) == Steinberg::kResultOk && + size.getWidth() > 0 && size.getHeight() > 0) { initial_size.emplace(size.getWidth(), size.getHeight()); }