From 4c3b7d9630e2bdc32cfc054f0c7041cc02534e46 Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Thu, 14 Nov 2019 19:01:01 +0100 Subject: [PATCH 1/4] Fix user-resizable embedded window in Reaper Mac This will inhibit applying the auto-resize mask until the initial size has been set in the PuglView. Initially, DPF would set this size to (1, 1). --- dgl/src/pugl/pugl_osx.m | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/dgl/src/pugl/pugl_osx.m b/dgl/src/pugl/pugl_osx.m index 80b99304..da595381 100644 --- a/dgl/src/pugl/pugl_osx.m +++ b/dgl/src/pugl/pugl_osx.m @@ -329,6 +329,7 @@ flagsChanged(NSView *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 *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 *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 *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 From a92759382429e6a7a7e5d8cf7d9801db5d1fa6b4 Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Mon, 25 Nov 2019 05:48:38 +0100 Subject: [PATCH 2/4] lv2: require the idleInterface feature --- distrho/src/DistrhoPluginLV2export.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/distrho/src/DistrhoPluginLV2export.cpp b/distrho/src/DistrhoPluginLV2export.cpp index 681b1b1b..cd7a6b96 100644 --- a/distrho/src/DistrhoPluginLV2export.cpp +++ b/distrho/src/DistrhoPluginLV2export.cpp @@ -145,6 +145,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, From 4e180a77ec6e93abb021b28495bd84b43498bf31 Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Mon, 25 Nov 2019 14:59:10 +0100 Subject: [PATCH 3/4] lv2: request the optional ui:parent feature --- distrho/src/DistrhoPluginLV2export.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/distrho/src/DistrhoPluginLV2export.cpp b/distrho/src/DistrhoPluginLV2export.cpp index cd7a6b96..7ccd4f0c 100644 --- 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 From de8ace2f3057fc033ee0477be9d524d3a344cd85 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 8 Jan 2020 09:50:38 +0000 Subject: [PATCH 4/4] Only use -mtune=generic on intel-based architectures Signed-off-by: falkTX --- Makefile.base.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.base.mk b/Makefile.base.mk index 5496a6ea..e1422c88 100644 --- 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)