DPF

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

commit 1e9e2067caa728fdb0b6d3b0001f37de721b0faa
parent 07bfa0adbfb941c65f1840f5a9ee503fbf15d272
Author: falkTX <falktx@falktx.com>
Date:   Wed,  8 Jan 2020 09:50:40 +0000

Merge branch 'develop'

Diffstat:
MMakefile.base.mk | 4++--
Mdgl/src/pugl/pugl_osx.m | 33+++++++++++++++++++++++++++++++++
Mdistrho/src/DistrhoPluginLV2export.cpp | 2++
3 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/Makefile.base.mk b/Makefile.base.mk @@ -129,10 +129,10 @@ endif # Set build and link flags BASE_FLAGS = -Wall -Wextra -pipe -MD -MP -BASE_OPTS = -O3 -ffast-math -mtune=generic -fdata-sections -ffunction-sections +BASE_OPTS = -O3 -ffast-math -fdata-sections -ffunction-sections ifeq ($(CPU_I386_OR_X86_64),true) -BASE_OPTS += -msse -msse2 +BASE_OPTS += -mtune=generic -msse -msse2 endif ifeq ($(CPU_ARM),true) diff --git a/dgl/src/pugl/pugl_osx.m b/dgl/src/pugl/pugl_osx.m @@ -329,6 +329,7 @@ flagsChanged(NSView<PuglGenericView> *self, NSEvent *event) - (void) keyDown:(NSEvent*)event; - (void) keyUp:(NSEvent*)event; - (void) flagsChanged:(NSEvent*)event; +- (void) resizeWithOldSuperviewSize:(NSSize)oldSize; @end @@ -527,6 +528,21 @@ flagsChanged(NSView<PuglGenericView> *self, NSEvent *event) flagsChanged(self, event); } +- (void) resizeWithOldSuperviewSize:(NSSize)oldSize +{ + PuglView *pv = self->puglview; + + if (pv->width <= 1 && pv->height <= 1) + { + /* NOTE: if the view size was not initialized yet, don't perform an + autoresize; it fixes manual resizing in Reaper. + */ + return; + } + + [super resizeWithOldSuperviewSize:oldSize]; +} + @end #endif @@ -570,6 +586,7 @@ flagsChanged(NSView<PuglGenericView> *self, NSEvent *event) - (void) keyDown:(NSEvent*)event; - (void) keyUp:(NSEvent*)event; - (void) flagsChanged:(NSEvent*)event; +- (void) resizeWithOldSuperviewSize:(NSSize)oldSize; @end @implementation PuglCairoView @@ -749,6 +766,22 @@ flagsChanged(NSView<PuglGenericView> *self, NSEvent *event) { flagsChanged(self, event); } + +- (void) resizeWithOldSuperviewSize:(NSSize)oldSize +{ + PuglView *pv = self->puglview; + + if (pv->width <= 1 && pv->height <= 1) + { + /* NOTE: if the view size was not initialized yet, don't perform an + autoresize; it fixes manual resizing in Reaper. + */ + return; + } + + [super resizeWithOldSuperviewSize:oldSize]; +} + @end #endif diff --git a/distrho/src/DistrhoPluginLV2export.cpp b/distrho/src/DistrhoPluginLV2export.cpp @@ -136,6 +136,7 @@ static const char* const lv2ManifestUiOptionalFeatures[] = # if !DISTRHO_UI_USER_RESIZABLE "ui:noUserResize", # endif + "ui:parent", "ui:resize", "ui:touch", #endif @@ -145,6 +146,7 @@ static const char* const lv2ManifestUiOptionalFeatures[] = static const char* const lv2ManifestUiRequiredFeatures[] = { "opts:options", + "ui:idleInterface", #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS LV2_DATA_ACCESS_URI, LV2_INSTANCE_ACCESS_URI,