# Workaround for bug in Wavelab 7 Mac 64 Vst no gui

**URL:** https://forum.juce.com/t/workaround-for-bug-in-wavelab-7-mac-64-vst-no-gui/7909
**Category:** Audio Plugins
**Created:** [December 23, 2011, 4:42am UTC](https://forum.juce.com/t/workaround-for-bug-in-wavelab-7-mac-64-vst-no-gui/7909 "2011-12-23T04:42:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![andy-cytomic](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/andy-cytomic/32/1838_2.png) [@andy-cytomic](https://forum.juce.com/u/andy-cytomic)
#### Post date: [December 23, 2011, 4:42am UTC](https://forum.juce.com/t/workaround-for-bug-in-wavelab-7-mac-64-vst-no-gui/7909/1 "2011-12-23T04:42:13Z")

</div>

For those that didn’t even know it yet Wavelab7 64-bit won’t display the vst plugin gui. The reason is that Wavelab 7 fails to initialise the rectangle passed into the plugin even though the plugin reports the correct size the rectangle should be just prior to this call. A zero size rectangle is passed in, and code in Juce then, I think trying to handle plugin headers added by some hosts, offsets the plugin gui to a negative position. I have contacted Philippe who writes Wavelab and asked him to fix this. As a defensive measure for “bad” hosts in the future you may also want to add this to the juce\_VST\_Wrapper.mm, which is a fix suggested by Jules that I have checked works fine:

```auto
void* attachComponentToWindowRef (Component* comp, void* windowRef)
{
    JUCE_AUTORELEASEPOOL

  #if JUCE_64BIT
    NSView* parentView = (NSView*) windowRef;

   #if JucePlugin_EditorRequiresKeyboardFocus
    comp->addToDesktop (0, parentView);
   #else
    comp->addToDesktop (ComponentPeer::windowIgnoresKeyPresses, parentView);
   #endif
   
    if ([parentView frame].size.height == 0)
    {
        [((NSView*) comp->getWindowHandle()) setFrameOrigin: NSZeroPoint];
    }
           
    comp->setVisible (true);
    comp->toFront (false);

    [[parentView window] setAcceptsMouseMovedEvents: YES];
    return parentView;
...
```
