mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-19 18:03:56 +02:00
Handle mutual recursion in context menus
REAPER will call `getState()` while the context menu is open, and that also has to be handled from the GUI thread.
This commit is contained in:
@@ -114,7 +114,10 @@ tresult PLUGIN_API Vst3ContextMenuProxyImpl::removeItem(
|
||||
|
||||
tresult PLUGIN_API Vst3ContextMenuProxyImpl::popup(Steinberg::UCoord x,
|
||||
Steinberg::UCoord y) {
|
||||
return bridge.send_message(
|
||||
// NOTE: This requires mutual recursion, because REAPER will call
|
||||
// `getState()` whle the context menu is open, and `getState()` also
|
||||
// has to be handled from the GUi thread
|
||||
return bridge.send_mutually_recursive_message(
|
||||
YaContextMenu::Popup{.owner_instance_id = owner_instance_id(),
|
||||
.context_menu_id = context_menu_id(),
|
||||
.x = x,
|
||||
|
||||
Reference in New Issue
Block a user