diff --git a/vstgui/lib/controls/ctextlabel.cpp b/vstgui/lib/controls/ctextlabel.cpp index ec6908f02..2a3659e3b 100644 --- a/vstgui/lib/controls/ctextlabel.cpp +++ b/vstgui/lib/controls/ctextlabel.cpp @@ -380,7 +380,8 @@ void CMultiLineTextLabel::calculateWrapLine (CDrawContext* context, lastSeparator = ++pos; if (pos == element.first.end ()) break; - UTF8String tmp ({start.base (), ++(pos.base ())}); + auto tmpEnd = pos; + UTF8String tmp ({start.base (), (++tmpEnd).base ()}); auto width = fontPainter->getStringWidth (context, tmp.getPlatformString ()); if (width > maxWidth) { diff --git a/vstgui/lib/platform/linux/x11frame.cpp b/vstgui/lib/platform/linux/x11frame.cpp index 8fe3525a4..785756ef3 100644 --- a/vstgui/lib/platform/linux/x11frame.cpp +++ b/vstgui/lib/platform/linux/x11frame.cpp @@ -121,7 +121,6 @@ struct DrawHandler ~DrawHandler () { - cairo_device_finish (device); cairo_device_destroy (device); } diff --git a/vstgui/lib/platform/mac/cfontmac.mm b/vstgui/lib/platform/mac/cfontmac.mm index 3a1553a08..0d8f0757f 100644 --- a/vstgui/lib/platform/mac/cfontmac.mm +++ b/vstgui/lib/platform/mac/cfontmac.mm @@ -103,23 +103,6 @@ void getUrlsForType (CFStringRef fontType, CFMutableArrayRef& array) CFMutableArrayRef fontUrls; }; -//----------------------------------------------------------------------------- -struct CTVersionCheck -{ - CTVersionCheck () - { - version = CTGetCoreTextVersion (); - } - uint32_t version; -}; - -//----------------------------------------------------------------------------- -static uint32_t getCTVersion () -{ - static CTVersionCheck gInstance; - return gInstance.version; -} - //----------------------------------------------------------------------------- bool CoreTextFont::getAllFontFamilies (const FontFamilyCallback& callback) noexcept { @@ -177,7 +160,7 @@ static CTFontRef CoreTextCreateTraitsVariant (CTFontRef fontRef, CTFontSymbolicT CFStringRef fontNameRef = fromUTF8String (name); if (fontNameRef) { - if (getCTVersion () >= 0x00060000) + if (@available (macOS 10.10, *)) { CFMutableDictionaryRef attributes = CFDictionaryCreateMutable (kCFAllocatorDefault, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); CFDictionaryAddValue (attributes, kCTFontFamilyNameAttribute, fontNameRef); diff --git a/vstgui/lib/vstguibase.h b/vstgui/lib/vstguibase.h index 5433bbf2d..29c0e3819 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 2 +#define VSTGUI_VERSION_PATCHLEVEL 3 //----------------------------------------------------------------------------- // Platform definitions diff --git a/vstgui/plugin-bindings/vst3editor.cpp b/vstgui/plugin-bindings/vst3editor.cpp index e3fc3daf9..23a1d81b9 100644 --- a/vstgui/plugin-bindings/vst3editor.cpp +++ b/vstgui/plugin-bindings/vst3editor.cpp @@ -325,6 +325,7 @@ class ParameterChangeListener : public Steinberg::FObject } else c->setValueNormalized ((float)value); + c->valueChanged (); } c->invalid (); } @@ -627,6 +628,8 @@ ParameterChangeListener* VST3Editor::getParameterChangeListener (int32_t tag) co void VST3Editor::valueChanged (CControl* pControl) { using namespace Steinberg; + if (!pControl->isEditing ()) + return; ParameterChangeListener* pcl = getParameterChangeListener (pControl->getTag ()); if (pcl) diff --git a/vstgui/tests/unittest/lib/platform_helper_mac.mm b/vstgui/tests/unittest/lib/platform_helper_mac.mm index 7433b8a48..5e1e812fe 100644 --- a/vstgui/tests/unittest/lib/platform_helper_mac.mm +++ b/vstgui/tests/unittest/lib/platform_helper_mac.mm @@ -14,7 +14,16 @@ MacParentHandle () { - window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 100, 100) styleMask:NSTitledWindowMask backing:NSBackingStoreBuffered defer:NO]; + NSWindowStyleMask style; +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 + style = NSWindowStyleMaskTitled; +#else + style = NSTitledWindowMask; +#endif + window = [[NSWindow alloc] initWithContentRect:NSMakeRect (0, 0, 100, 100) + styleMask:style + backing:NSBackingStoreBuffered + defer:NO]; } ~MacParentHandle () override diff --git a/vstgui/uidescription/uidescription.cpp b/vstgui/uidescription/uidescription.cpp index f443a222e..9adcd9a36 100644 --- a/vstgui/uidescription/uidescription.cpp +++ b/vstgui/uidescription/uidescription.cpp @@ -10,6 +10,7 @@ #include "cstream.h" #include "base64codec.h" #include "uicontentprovider.h" +#include "uiviewswitchcontainer.h" #include "icontroller.h" #include "xmlparser.h" #include "../lib/cfont.h" @@ -1591,7 +1592,7 @@ bool UIDescription::updateAttributesForView (UINode* node, CView* view, bool dee node->getAttributes ()->setAttribute (UIViewCreator::kAttrClass, factory->getViewName (view)); result = true; } - if (deep && container) + if (deep && container && dynamic_cast (container) == nullptr) { ViewIterator it (container); while (*it)