Browse Source

macOS related workarounds

tags/v1.9.11
falkTX 7 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.fLastTransportState = False
self.fSampleRate = 0.0 self.fSampleRate = 0.0


if MACOS:
self.fMacClosingHelper = True

# run a custom action after engine is properly closed # run a custom action after engine is properly closed
self.fCustomStopAction = self.CUSTOM_ACTION_NONE self.fCustomStopAction = self.CUSTOM_ACTION_NONE


@@ -2354,6 +2357,16 @@ class HostWindow(QMainWindow):
event.ignore() event.ignore()
return 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.killTimers()
self.saveSettings() self.saveSettings()




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

@@ -475,7 +475,7 @@ public:
style |= NSResizableWindowMask; style |= NSResizableWindowMask;
*/ */


NSRect frame = NSMakeRect(0, 0, 100, 100);
NSRect frame = NSMakeRect(0, 0, 800, 600);


fWindow = [[[CarlaPluginWindow alloc] fWindow = [[[CarlaPluginWindow alloc]
initWithContentRect:frame initWithContentRect:frame
@@ -577,11 +577,11 @@ public:
[fWindow setContentMaxSize:NSMakeSize(99999, 99999)]; [fWindow setContentMaxSize:NSMakeSize(99999, 99999)];
} }
else else
*/
{ {
[fWindow setContentMinSize:size]; [fWindow setContentMinSize:size];
[fWindow setContentMaxSize:size]; [fWindow setContentMaxSize:size];
} }
*/


if (forceUpdate) if (forceUpdate)
{ {


Loading…
Cancel
Save