From a5fb843f04833172a679511b201e704e2f3eb63e Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 9 Sep 2018 20:52:53 +0100 Subject: [PATCH] macOS related workarounds --- source/frontend/carla_host.py | 13 +++++++++++++ source/utils/CarlaPluginUI.cpp | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/source/frontend/carla_host.py b/source/frontend/carla_host.py index 70f0d78fe..fabb2b47c 100644 --- a/source/frontend/carla_host.py +++ b/source/frontend/carla_host.py @@ -157,6 +157,9 @@ class HostWindow(QMainWindow): self.fLastTransportState = False self.fSampleRate = 0.0 + if MACOS: + self.fMacClosingHelper = True + # run a custom action after engine is properly closed self.fCustomStopAction = self.CUSTOM_ACTION_NONE @@ -2354,6 +2357,16 @@ class HostWindow(QMainWindow): event.ignore() return + if MACOS and self.fMacClosingHelper: + self.fMacClosingHelper = False + event.ignore() + + for i in reversed(range(self.fPluginCount)): + self.host.show_custom_ui(i, False) + + QTimer.singleShot(100, self.close) + return + self.killTimers() self.saveSettings() diff --git a/source/utils/CarlaPluginUI.cpp b/source/utils/CarlaPluginUI.cpp index b8def92e8..8bfbebf99 100644 --- a/source/utils/CarlaPluginUI.cpp +++ b/source/utils/CarlaPluginUI.cpp @@ -475,7 +475,7 @@ public: style |= NSResizableWindowMask; */ - NSRect frame = NSMakeRect(0, 0, 100, 100); + NSRect frame = NSMakeRect(0, 0, 800, 600); fWindow = [[[CarlaPluginWindow alloc] initWithContentRect:frame @@ -577,11 +577,11 @@ public: [fWindow setContentMaxSize:NSMakeSize(99999, 99999)]; } else - */ { [fWindow setContentMinSize:size]; [fWindow setContentMaxSize:size]; } + */ if (forceUpdate) {