Browse Source

OSX embedding now working; Cleanup

gh-pages
falkTX 10 years ago
parent
commit
3c1c89a04b
3 changed files with 5 additions and 14 deletions
  1. +2
    -9
      dgl/src/Window.cpp
  2. +2
    -5
      dgl/src/pugl/pugl_osx.m
  3. +1
    -0
      distrho/src/DistrhoPluginVST.cpp

+ 2
- 9
dgl/src/Window.cpp View File

@@ -488,18 +488,11 @@ struct Window::PrivateData {
if (! forced) if (! forced)
UpdateWindow(hwnd); UpdateWindow(hwnd);
#elif defined(DISTRHO_OS_MAC) #elif defined(DISTRHO_OS_MAC)
[mView setBoundsSize:NSMakeSize(width, height)];
[mView setFrame:NSMakeRect(0, 0, width, height)];


if (mWindow != nullptr) if (mWindow != nullptr)
{ {
[mWindow setContentSize:NSMakeSize(width, height)]; [mWindow setContentSize:NSMakeSize(width, height)];
# if 0
NSRect frame = [mWindow frame];
frame.origin.y -= height - frame.size.height;
frame.size.width = width;
frame.size.height = height+20;
[mWindow setFrame:frame display:YES animate:NO];
# endif
} }
#elif defined(DISTRHO_OS_LINUX) #elif defined(DISTRHO_OS_LINUX)
XResizeWindow(xDisplay, xWindow, width, height); XResizeWindow(xDisplay, xWindow, width, height);
@@ -537,7 +530,7 @@ struct Window::PrivateData {
SetWindowTextA(hwnd, title); SetWindowTextA(hwnd, title);
#elif defined(DISTRHO_OS_MAC) #elif defined(DISTRHO_OS_MAC)
if (mWindow != nullptr) if (mWindow != nullptr)
{
{
NSString* titleString = [[NSString alloc] NSString* titleString = [[NSString alloc]
initWithBytes:title initWithBytes:title
length:strlen(title) length:strlen(title)


+ 2
- 5
dgl/src/pugl/pugl_osx.m View File

@@ -374,11 +374,9 @@ puglCreateWindow(PuglView* view, const char* title)
[impl->glview setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable]; [impl->glview setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable];
} }


//[impl->glview setBoundsSize:NSMakeSize(impl->glview->puglview->width, impl->glview->puglview->height)];

if (view->parent) { if (view->parent) {
//NSView* pview = (NSView*)view->parent;
//[pview addSubview:impl->glview];
NSView* pview = (NSView*)view->parent;
[pview addSubview:impl->glview];
return 0; return 0;
} }


@@ -393,7 +391,6 @@ puglCreateWindow(PuglView* view, const char* title)
[window setTitle:titleString]; [window setTitle:titleString];
} }


//[window setPuglview:nil];
[window setPuglview:view]; [window setPuglview:view];
[window setContentView:impl->glview]; [window setContentView:impl->glview];
[window makeFirstResponder:impl->glview]; [window makeFirstResponder:impl->glview];


+ 1
- 0
distrho/src/DistrhoPluginVST.cpp View File

@@ -1019,6 +1019,7 @@ const AEffect* VSTPluginMain(audioMasterCallback audioMaster)
// parameter outputs must be all at the end // parameter outputs must be all at the end
DISTRHO_SAFE_ASSERT_BREAK(! outputsReached); DISTRHO_SAFE_ASSERT_BREAK(! outputsReached);
++numParams; ++numParams;
continue;
} }
outputsReached = true; outputsReached = true;
} }


Loading…
Cancel
Save