mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Delay showing editor the window
This fixes Waves V13 VST3 plugins crashing when opening the editor. They will likely still crash later on anyways because they're kinda broken. Amazing.
This commit is contained in:
@@ -29,6 +29,11 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed _Waves_ V13 VST3 plugins crashing when opening the GUI. These plugins
|
||||||
|
thought it would be a great idea to randomly dereference null pointers if the
|
||||||
|
window they're embedded in is already visible. A day's worth of debugging well
|
||||||
|
spent. Even after this, the V13 plugins are a bit unstable under Wine in
|
||||||
|
general. So as always, if you can avoid them, that would be for the best.
|
||||||
- Fixed sluggish UIs in _Output's Thermal_ and likely a handful of other
|
- Fixed sluggish UIs in _Output's Thermal_ and likely a handful of other
|
||||||
JUCE-based plugins. These plugins would emit hundreds to thousands of events
|
JUCE-based plugins. These plugins would emit hundreds to thousands of events
|
||||||
when the GUI changes. Yabridge now detects this, and removes the throttling we
|
when the GUI changes. Yabridge now detects this, and removes the throttling we
|
||||||
|
|||||||
@@ -743,6 +743,12 @@ intptr_t Vst2Bridge::dispatch_wrapper(AEffect* plugin,
|
|||||||
plugin->dispatcher(plugin, opcode, index, value,
|
plugin->dispatcher(plugin, opcode, index, value,
|
||||||
editor_instance.get_win32_handle(), option);
|
editor_instance.get_win32_handle(), option);
|
||||||
|
|
||||||
|
// NOTE: There's zero reason why the window couldn't already be
|
||||||
|
// visible from the start, but Waves V13 VST3 plugins think it
|
||||||
|
// would be a splendid idea to randomly dereference null
|
||||||
|
// pointers when the window is already visible. Thanks Waves.
|
||||||
|
editor_instance.show();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
} break;
|
} break;
|
||||||
case effEditClose: {
|
case effEditClose: {
|
||||||
|
|||||||
@@ -809,6 +809,14 @@ void Vst3Bridge::run() {
|
|||||||
instance.editor->resize(size.getWidth(),
|
instance.editor->resize(size.getWidth(),
|
||||||
size.getHeight());
|
size.getHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOTE: There's zero reason why the window couldn't
|
||||||
|
// already be visible from the start, but
|
||||||
|
// Waves V13 VST3 plugins think it would be a
|
||||||
|
// splendid idea to randomly dereference null
|
||||||
|
// pointers when the window is already
|
||||||
|
// visible. Thanks Waves.
|
||||||
|
instance.editor->show();
|
||||||
} else {
|
} else {
|
||||||
instance.editor.reset();
|
instance.editor.reset();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -426,8 +426,6 @@ Editor::Editor(MainContext& main_context,
|
|||||||
// the child window ourselves. This is a hack to work around the issue's
|
// the child window ourselves. This is a hack to work around the issue's
|
||||||
// described in `Editor`'s docstring'.
|
// described in `Editor`'s docstring'.
|
||||||
do_reparent(wine_window_, wrapper_window_.window_);
|
do_reparent(wine_window_, wrapper_window_.window_);
|
||||||
|
|
||||||
ShowWindow(win32_window_.handle_, SW_SHOWNORMAL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -468,6 +466,10 @@ void Editor::resize(uint16_t width, uint16_t height) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Editor::show() noexcept {
|
||||||
|
ShowWindow(win32_window_.handle_, SW_SHOWNORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
void Editor::handle_x11_events() noexcept {
|
void Editor::handle_x11_events() noexcept {
|
||||||
// NOTE: Ardour will unmap the window instead of closing the editor. When
|
// NOTE: Ardour will unmap the window instead of closing the editor. When
|
||||||
// the window is unmapped `wine_window_` doesn't exist and any X11
|
// the window is unmapped `wine_window_` doesn't exist and any X11
|
||||||
@@ -1110,8 +1112,6 @@ void Editor::do_xembed() const {
|
|||||||
|
|
||||||
xcb_map_window(x11_connection_.get(), wine_window_);
|
xcb_map_window(x11_connection_.get(), wine_window_);
|
||||||
xcb_flush(x11_connection_.get());
|
xcb_flush(x11_connection_.get());
|
||||||
|
|
||||||
ShowWindow(win32_window_.handle_, SW_SHOWNORMAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT CALLBACK window_proc(HWND handle,
|
LRESULT CALLBACK window_proc(HWND handle,
|
||||||
|
|||||||
@@ -195,6 +195,13 @@ class Editor {
|
|||||||
*/
|
*/
|
||||||
void resize(uint16_t width, uint16_t height);
|
void resize(uint16_t width, uint16_t height);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
* or in `do_xembed()`, but it needs to be. Thanks Waves.
|
||||||
|
*/
|
||||||
|
void show() noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle X11 events sent to the window our editor is embedded in.
|
* Handle X11 events sent to the window our editor is embedded in.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user