Browse Source

macOS related workarounds

tags/v1.9.11
falkTX 6 years ago
parent
commit
a5fb843f04
2 changed files with 15 additions and 2 deletions
  1. +13
    -0
      source/frontend/carla_host.py
  2. +2
    -2
      source/utils/CarlaPluginUI.cpp

+ 13
- 0
source/frontend/carla_host.py View File

@@ -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()



+ 2
- 2
source/utils/CarlaPluginUI.cpp View File

@@ -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)
{


Loading…
Cancel
Save