Run certain GUI tasks from the host's run loop

This was a bit of a tricky one because it requires simulating mutual
recursion, but it's needed for REAPER as otherwide calls to
`IPlugFrame::resizeView()` and `IContextMenu::popup()` might cause
REAPER to segfault because its GUI is not thread safe.
This commit is contained in:
Robbert van der Helm
2021-01-18 14:19:31 +01:00
parent 5ad47c8c68
commit bb5471f2d9
5 changed files with 333 additions and 30 deletions
+2
View File
@@ -244,6 +244,8 @@ class Vst3Bridge : public HostBridge {
* The hacky solution here is to send the message from another thread, and
* to then allow this thread to execute other functions submitted to an IO
* context.
*
* We apply the same trick in `Vst3PlugViewProxyImpl`.
*/
template <typename T>
typename T::Response send_mutually_recursive_message(const T& object) {