X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ee6a122fa3446c7aa020e7fdfeb85584d92309d1..d485bda109d5ef0fef36a3f737549e9b9f54baab:/src/osx/cocoa/utils.mm diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm index 9a7d446ff8..f4702bb185 100644 --- a/src/osx/cocoa/utils.mm +++ b/src/osx/cocoa/utils.mm @@ -71,7 +71,7 @@ void wxBell() const size_t count = [fileNames count]; for (i = 0; i < count; i++) { - fileList.Add( wxCFStringRef::AsString([fileNames objectAtIndex:i]) ); + fileList.Add( wxCFStringRef::AsStringWithNormalizationFormC([fileNames objectAtIndex:i]) ); } wxTheApp->MacOpenFiles(fileList); @@ -259,7 +259,14 @@ void wxBell() @end -wxNSAppController* appcontroller = nil; +WX_NSObject appcontroller = nil; + +NSLayoutManager* gNSLayoutManager = nil; + +WX_NSObject wxApp::OSXCreateAppController() +{ + return [[wxNSAppController alloc] init]; +} bool wxApp::DoInitGui() { @@ -269,7 +276,7 @@ bool wxApp::DoInitGui() { [wxNSApplication sharedApplication]; - appcontroller = [[wxNSAppController alloc] init]; + appcontroller = OSXCreateAppController(); [NSApp setDelegate:appcontroller]; // calling finishLaunching so early before running the loop seems to trigger some 'MenuManager compatibility' which leads @@ -278,6 +285,8 @@ bool wxApp::DoInitGui() [NSApp finishLaunching]; #endif } + gNSLayoutManager = [[NSLayoutManager alloc] init]; + return true; } @@ -289,6 +298,11 @@ void wxApp::DoCleanUp() [appcontroller release]; appcontroller = nil; } + if ( gNSLayoutManager != nil ) + { + [gNSLayoutManager release]; + gNSLayoutManager = nil; + } } void wxClientDisplayRect(int *x, int *y, int *width, int *height)