DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 1b435c51a798eed3f0dcd395e40bb580ebbd5fd4
parent 1a8954821d65d45c0e5a842879fb33fb1694c0b0
Author: falkTX <falktx@gmail.com>
Date:   Sat, 11 Oct 2014 14:58:25 +0100

Misc, this shouldn't be crashing...

Diffstat:
Mdgl/src/Window.cpp | 6+++++-
Mdgl/src/pugl/pugl_osx.m | 5+++--
2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp @@ -194,7 +194,11 @@ struct Window::PrivateData { mView = impl->glview; mWindow = impl->window; DISTRHO_SAFE_ASSERT(mView != nullptr); - DISTRHO_SAFE_ASSERT(fUsingEmbed || mWindow != nullptr); + if (fUsingEmbed) { + DISTRHO_SAFE_ASSERT(mWindow == nullptr); + } else { + DISTRHO_SAFE_ASSERT(mWindow != nullptr); + } #elif defined(DISTRHO_OS_LINUX) xDisplay = impl->display; xWindow = impl->win; diff --git a/dgl/src/pugl/pugl_osx.m b/dgl/src/pugl/pugl_osx.m @@ -377,8 +377,8 @@ puglCreateWindow(PuglView* view, const char* title) //[impl->glview setBoundsSize:NSMakeSize(impl->glview->puglview->width, impl->glview->puglview->height)]; if (view->parent) { - NSView* pview = (NSView*)view->parent; - [pview addSubview:impl->glview]; + //NSView* pview = (NSView*)view->parent; + //[pview addSubview:impl->glview]; return 0; } @@ -393,6 +393,7 @@ puglCreateWindow(PuglView* view, const char* title) [window setTitle:titleString]; } + //[window setPuglview:nil]; [window setPuglview:view]; [window setContentView:impl->glview]; [window makeFirstResponder:impl->glview];