Update the ViewRect in checkSizeConstraint()

This commit is contained in:
Robbert van der Helm
2020-12-30 14:35:18 +01:00
parent 8458ea041f
commit 651ebd4db3
5 changed files with 45 additions and 7 deletions
@@ -146,8 +146,13 @@ tresult PLUGIN_API Vst3PlugViewProxyImpl::canResize() {
tresult PLUGIN_API
Vst3PlugViewProxyImpl::checkSizeConstraint(Steinberg::ViewRect* rect) {
if (rect) {
return bridge.send_message(YaPlugView::CheckSizeConstraint{
.owner_instance_id = owner_instance_id(), .rect = *rect});
const CheckSizeConstraintResponse response =
bridge.send_message(YaPlugView::CheckSizeConstraint{
.owner_instance_id = owner_instance_id(), .rect = *rect});
*rect = response.updated_rect;
return response.result;
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "