diff --git a/src/NPlug/IAudioPluginView.cs b/src/NPlug/IAudioPluginView.cs
index 4f21905..d971488 100644
--- a/src/NPlug/IAudioPluginView.cs
+++ b/src/NPlug/IAudioPluginView.cs
@@ -2,10 +2,6 @@
// Licensed under the BSD-Clause 2 license.
// See license.txt file in the project root for full license information.
-using NPlug.Interop;
-using System.Runtime.InteropServices;
-using static NPlug.Interop.LibVst;
-
namespace NPlug;
///
@@ -67,7 +63,7 @@ public interface IAudioPluginView
/// Handling of mouse wheel.
///
void OnWheel(float distance);
-
+
///
/// Handling of keyboard events : Key Down.
///
@@ -97,7 +93,7 @@ public interface IAudioPluginView
/// requests a resize (IPlugFrame::resizeView ()) onSize has to be called afterward.
///
void OnSize(ViewRectangle newSize);
-
+
///
/// Focus changed message.
///
@@ -117,7 +113,7 @@ public interface IAudioPluginView
/// On live resize this is called to check if the view can be resized to the given rect, if not
/// adjust the rect to the allowed size.
///
- bool CheckSizeConstraint(ViewRectangle rect);
+ bool CheckSizeConstraint(ref ViewRectangle rect);
///
/// This interface communicates the content scale factor from the host to the plug-in view on
diff --git a/src/NPlug/Interop/LibVst.IPlugView.cs b/src/NPlug/Interop/LibVst.IPlugView.cs
index 20a0359..4965b71 100644
--- a/src/NPlug/Interop/LibVst.IPlugView.cs
+++ b/src/NPlug/Interop/LibVst.IPlugView.cs
@@ -86,7 +86,7 @@ private static partial ComResult canResize_ToManaged(IPlugView* self)
private static partial ComResult checkSizeConstraint_ToManaged(IPlugView* self, ViewRect* rect)
{
- return Get(self).CheckSizeConstraint(*(ViewRectangle*)rect);
+ return Get(self).CheckSizeConstraint(ref *(ViewRectangle*)rect);
}
private static bool TryGetPlatform(FIDString type, out AudioPluginViewPlatform platform)