@@ -12,6 +12,9 @@ BUILD_C_FLAGS += $(DGL_FLAGS) -I. -Isrc | |||||
BUILD_CXX_FLAGS += $(DGL_FLAGS) -I. -Isrc | BUILD_CXX_FLAGS += $(DGL_FLAGS) -I. -Isrc | ||||
LINK_FLAGS += $(DGL_LIBS) | LINK_FLAGS += $(DGL_LIBS) | ||||
# needed by oui-blendish | |||||
BUILD_CXX_FLAGS += -Wno-unused-parameter | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
OBJS = \ | OBJS = \ | ||||
@@ -932,6 +932,7 @@ NanoWidget::NanoWidget(NanoWidget* groupWidget) | |||||
nData(new PrivateData(this)) | nData(new PrivateData(this)) | ||||
{ | { | ||||
pData->needsScaling = true; | pData->needsScaling = true; | ||||
pData->skipDisplay = true; | |||||
groupWidget->nData->subWidgets.push_back(this); | groupWidget->nData->subWidgets.push_back(this); | ||||
} | } | ||||
@@ -51,7 +51,10 @@ struct Widget::PrivateData { | |||||
visible(true) | visible(true) | ||||
{ | { | ||||
if (addToSubWidgets && groupWidget != nullptr) | if (addToSubWidgets && groupWidget != nullptr) | ||||
{ | |||||
skipDisplay = true; | |||||
groupWidget->pData->subWidgets.push_back(self); | groupWidget->pData->subWidgets.push_back(self); | ||||
} | |||||
} | } | ||||
~PrivateData() | ~PrivateData() | ||||
@@ -87,9 +87,12 @@ void | |||||
puglLeaveContext(PuglView* view, bool flush) | puglLeaveContext(PuglView* view, bool flush) | ||||
{ | { | ||||
#ifdef PUGL_HAVE_GL | #ifdef PUGL_HAVE_GL | ||||
if (view->ctx_type == PUGL_GL && flush) { | |||||
glFlush(); | |||||
SwapBuffers(view->impl->hdc); | |||||
if (view->ctx_type == PUGL_GL) { | |||||
if (flush) { | |||||
glFlush(); | |||||
SwapBuffers(view->impl->hdc); | |||||
} | |||||
wglMakeCurrent(NULL, NULL); | |||||
} | } | ||||
#endif | #endif | ||||
} | } | ||||
@@ -218,11 +218,14 @@ void | |||||
puglLeaveContext(PuglView* view, bool flush) | puglLeaveContext(PuglView* view, bool flush) | ||||
{ | { | ||||
#ifdef PUGL_HAVE_GL | #ifdef PUGL_HAVE_GL | ||||
if (view->ctx_type == PUGL_GL && flush) { | |||||
glFlush(); | |||||
if (view->impl->doubleBuffered) { | |||||
glXSwapBuffers(view->impl->display, view->impl->win); | |||||
if (view->ctx_type == PUGL_GL) { | |||||
if (flush) { | |||||
glFlush(); | |||||
if (view->impl->doubleBuffered) { | |||||
glXSwapBuffers(view->impl->display, view->impl->win); | |||||
} | |||||
} | } | ||||
glXMakeCurrent(view->impl->display, None, NULL); | |||||
} | } | ||||
#endif | #endif | ||||
} | } | ||||
@@ -104,6 +104,14 @@ | |||||
# error Synths need MIDI input to work! | # error Synths need MIDI input to work! | ||||
#endif | #endif | ||||
// ----------------------------------------------------------------------- | |||||
// Disable UI if DGL is not available | |||||
#if DISTRHO_PLUGIN_HAS_UI && ! defined(HAVE_DGL) | |||||
# undef DISTRHO_PLUGIN_HAS_UI | |||||
# define DISTRHO_PLUGIN_HAS_UI 0 | |||||
#endif | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
#endif // DISTRHO_PLUGIN_CHECKS_H_INCLUDED | #endif // DISTRHO_PLUGIN_CHECKS_H_INCLUDED |