@@ -15,9 +15,6 @@ LINK_FLAGS += $(DGL_LIBS) | |||||
ifneq ($(MACOS_OLD),true) | ifneq ($(MACOS_OLD),true) | ||||
# needed by sofd right now, fix later | # needed by sofd right now, fix later | ||||
BUILD_CXX_FLAGS += -Wno-type-limits -fpermissive | BUILD_CXX_FLAGS += -Wno-type-limits -fpermissive | ||||
# needed by stb_image | |||||
BUILD_CXX_FLAGS += -Wno-misleading-indentation -Wno-shift-negative-value | |||||
endif | endif | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
@@ -1,6 +1,6 @@ | |||||
/* | /* | ||||
* DISTRHO Plugin Framework (DPF) | * DISTRHO Plugin Framework (DPF) | ||||
* Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com> | |||||
* Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> | |||||
* | * | ||||
* Permission to use, copy, modify, and/or distribute this software for any purpose with | * Permission to use, copy, modify, and/or distribute this software for any purpose with | ||||
* or without fee is hereby granted, provided that the above copyright notice and this | * or without fee is hereby granted, provided that the above copyright notice and this | ||||
@@ -972,8 +972,18 @@ END_NAMESPACE_DGL | |||||
#undef final | #undef final | ||||
#if defined(__GNUC__) && (__GNUC__ >= 6) | |||||
# pragma GCC diagnostic push | |||||
# pragma GCC diagnostic ignored "-Wmisleading-indentation" | |||||
# pragma GCC diagnostic ignored "-Wshift-negative-value" | |||||
#endif | |||||
extern "C" { | extern "C" { | ||||
#include "nanovg/nanovg.c" | #include "nanovg/nanovg.c" | ||||
} | } | ||||
#if defined(__GNUC__) && (__GNUC__ >= 6) | |||||
# pragma GCC diagnostic pop | |||||
#endif | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- |
@@ -1,6 +1,6 @@ | |||||
/* | /* | ||||
* DISTRHO Plugin Framework (DPF) | * DISTRHO Plugin Framework (DPF) | ||||
* Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com> | |||||
* Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> | |||||
* | * | ||||
* Permission to use, copy, modify, and/or distribute this software for any purpose with | * Permission to use, copy, modify, and/or distribute this software for any purpose with | ||||
* or without fee is hereby granted, provided that the above copyright notice and this | * or without fee is hereby granted, provided that the above copyright notice and this | ||||
@@ -25,6 +25,11 @@ | |||||
#include "pugl/pugl.h" | #include "pugl/pugl.h" | ||||
#if defined(__GNUC__) && (__GNUC__ >= 7) | |||||
# pragma GCC diagnostic push | |||||
# pragma GCC diagnostic ignored "-Wimplicit-fallthrough" | |||||
#endif | |||||
#if defined(DISTRHO_OS_WINDOWS) | #if defined(DISTRHO_OS_WINDOWS) | ||||
# include "pugl/pugl_win.cpp" | # include "pugl/pugl_win.cpp" | ||||
#elif defined(DISTRHO_OS_MAC) | #elif defined(DISTRHO_OS_MAC) | ||||
@@ -37,6 +42,10 @@ extern "C" { | |||||
} | } | ||||
#endif | #endif | ||||
#if defined(__GNUC__) && (__GNUC__ >= 7) | |||||
# pragma GCC diagnostic pop | |||||
#endif | |||||
#include "ApplicationPrivateData.hpp" | #include "ApplicationPrivateData.hpp" | ||||
#include "WidgetPrivateData.hpp" | #include "WidgetPrivateData.hpp" | ||||
#include "../StandaloneWindow.hpp" | #include "../StandaloneWindow.hpp" | ||||
@@ -123,11 +132,14 @@ struct Window::PrivateData { | |||||
#if defined(DISTRHO_OS_WINDOWS) | #if defined(DISTRHO_OS_WINDOWS) | ||||
// TODO | // TODO | ||||
#elif defined(DISTRHO_OS_MAC) | #elif defined(DISTRHO_OS_MAC) | ||||
// TODO | |||||
//[parentImpl->window orderWindow:NSWindowBelow relativeTo:[[mView window] windowNumber]]; | |||||
[parentImpl->window orderWindow:NSWindowBelow relativeTo:[[mView window] windowNumber]]; | |||||
#else | #else | ||||
XSetTransientForHint(xDisplay, xWindow, parentImpl->win); | XSetTransientForHint(xDisplay, xWindow, parentImpl->win); | ||||
#endif | #endif | ||||
return; | |||||
// maybe unused | |||||
(void)parentImpl; | |||||
} | } | ||||
PrivateData(Application& app, Window* const self, const intptr_t parentId) | PrivateData(Application& app, Window* const self, const intptr_t parentId) | ||||
@@ -392,11 +404,7 @@ struct Window::PrivateData { | |||||
SetFocus(hwnd); | SetFocus(hwnd); | ||||
#elif defined(DISTRHO_OS_MAC) | #elif defined(DISTRHO_OS_MAC) | ||||
if (mWindow != nullptr) | if (mWindow != nullptr) | ||||
{ | |||||
// TODO | |||||
//[NSApp activateIgnoringOtherApps:YES]; | |||||
//[mWindow makeKeyAndOrderFront:mWindow]; | |||||
} | |||||
[mWindow makeKeyWindow]; | |||||
#else | #else | ||||
XRaiseWindow(xDisplay, xWindow); | XRaiseWindow(xDisplay, xWindow); | ||||
XSetInputFocus(xDisplay, xWindow, RevertToPointerRoot, CurrentTime); | XSetInputFocus(xDisplay, xWindow, RevertToPointerRoot, CurrentTime); | ||||
@@ -615,10 +623,17 @@ struct Window::PrivateData { | |||||
void setTransientWinId(const uintptr_t winId) | void setTransientWinId(const uintptr_t winId) | ||||
{ | { | ||||
DISTRHO_SAFE_ASSERT_RETURN(winId != 0,); | |||||
#if defined(DISTRHO_OS_WINDOWS) | #if defined(DISTRHO_OS_WINDOWS) | ||||
// TODO | // TODO | ||||
#elif defined(DISTRHO_OS_MAC) | #elif defined(DISTRHO_OS_MAC) | ||||
// TODO | |||||
NSWindow* const window = [NSApp windowWithWindowNumber:winId]; | |||||
DISTRHO_SAFE_ASSERT_RETURN(window != nullptr,); | |||||
[window addChildWindow:mWindow | |||||
ordered:NSWindowAbove]; | |||||
[mWindow makeKeyWindow]; | |||||
#else | #else | ||||
XSetTransientForHint(xDisplay, xWindow, static_cast< ::Window>(winId)); | XSetTransientForHint(xDisplay, xWindow, static_cast< ::Window>(winId)); | ||||
#endif | #endif | ||||
@@ -441,13 +441,11 @@ 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) { | |||||
if (flush) { | |||||
if (view->impl->glview->doubleBuffered) { | |||||
[[view->impl->glview openGLContext] flushBuffer]; | |||||
} else { | |||||
glFlush(); | |||||
} | |||||
if (view->ctx_type == PUGL_GL && flush) { | |||||
if (view->impl->glview->doubleBuffered) { | |||||
[[view->impl->glview openGLContext] flushBuffer]; | |||||
} else { | |||||
glFlush(); | |||||
} | } | ||||
//[NSOpenGLContext clearCurrentContext]; | //[NSOpenGLContext clearCurrentContext]; | ||||
} | } | ||||
@@ -575,4 +573,7 @@ void* | |||||
puglGetContext(PuglView* view) | puglGetContext(PuglView* view) | ||||
{ | { | ||||
return NULL; | return NULL; | ||||
// unused | |||||
(void)view; | |||||
} | } |
@@ -1,6 +1,6 @@ | |||||
/* | /* | ||||
* DISTRHO Plugin Framework (DPF) | * DISTRHO Plugin Framework (DPF) | ||||
* Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com> | |||||
* Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> | |||||
* | * | ||||
* Permission to use, copy, modify, and/or distribute this software for any purpose with | * Permission to use, copy, modify, and/or distribute this software for any purpose with | ||||
* or without fee is hereby granted, provided that the above copyright notice and this | * or without fee is hereby granted, provided that the above copyright notice and this | ||||
@@ -33,7 +33,7 @@ | |||||
# include <stdint.h> | # include <stdint.h> | ||||
#endif | #endif | ||||
#if defined(DISTRHO_OS_MAC) && ! defined(CARLA_OS_MAC) && ! (defined(DISTRHO_PROPER_CPP11_SUPPORT) && defined(__clang__)) | |||||
#if defined(DISTRHO_OS_MAC) && ! defined(CARLA_OS_MAC) && ! defined(DISTRHO_PROPER_CPP11_SUPPORT) | |||||
namespace std { | namespace std { | ||||
inline float fmin(float __x, float __y) | inline float fmin(float __x, float __y) | ||||
{ return __builtin_fminf(__x, __y); } | { return __builtin_fminf(__x, __y); } | ||||