diff --git a/vstgui/lib/platform/mac/cocoa/nsviewframe.mm b/vstgui/lib/platform/mac/cocoa/nsviewframe.mm index ac621f8cb..f4c303f30 100644 --- a/vstgui/lib/platform/mac/cocoa/nsviewframe.mm +++ b/vstgui/lib/platform/mac/cocoa/nsviewframe.mm @@ -284,9 +284,12 @@ static void VSTGUI_NSView_drawRect (id self, SEL _cmd, NSRect rect) //------------------------------------------------------------------------ static void VSTGUI_NSView_viewWillDraw (id self, SEL _cmd) { - if (auto layer = [self layer]) + if (@available (macOS 10.12, *)) { - layer.contentsFormat = kCAContentsFormatRGBA8Uint; + if (auto layer = [self layer]) + { + layer.contentsFormat = kCAContentsFormatRGBA8Uint; + } } __OBJC_SUPER (self) SuperViewWillRedraw (SUPER, _cmd); @@ -834,15 +837,14 @@ static id VSTGUI_NSView_makeTouchbar (id self) auto processInfo = [NSProcessInfo processInfo]; if ([processInfo respondsToSelector:@selector(operatingSystemVersion)]) { - auto systemVersion = processInfo.operatingSystemVersion; // on Mac OS X 10.11 we activate layer drawing as this fixes a few issues like that only a // few parts of a window are updated permanently when scrolling or manipulating a control // while other parts are only updated when the malipulation ended, or CNinePartTiledBitmap // are drawn incorrectly when scaled. - if (systemVersion.majorVersion > 10 || (systemVersion.majorVersion >= 10 && systemVersion.minorVersion > 10)) + if (@available (macOS 10.11, *)) { [nsView setWantsLayer:YES]; - if (systemVersion.majorVersion > 10 || (systemVersion.majorVersion >= 10 && systemVersion.minorVersion >= 13)) + if (@available (macOS 10.13, *)) { nsView.layer.contentsFormat = kCAContentsFormatRGBA8Uint; // asynchronous layer drawing or drawing only dirty rectangles are exclusive as diff --git a/vstgui/lib/vstguibase.h b/vstgui/lib/vstguibase.h index 516b5ee52..5433bbf2d 100644 --- a/vstgui/lib/vstguibase.h +++ b/vstgui/lib/vstguibase.h @@ -13,7 +13,7 @@ //----------------------------------------------------------------------------- #define VSTGUI_VERSION_MAJOR 4 #define VSTGUI_VERSION_MINOR 10 -#define VSTGUI_VERSION_PATCHLEVEL 1 +#define VSTGUI_VERSION_PATCHLEVEL 2 //----------------------------------------------------------------------------- // Platform definitions