From: Stefan Csomor Date: Wed, 29 Aug 2012 12:15:50 +0000 (+0000) Subject: add global NSLayoutManager instance X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/befe64edb45229e114b9c07606356b3aadd876ee add global NSLayoutManager instance git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/osx/cocoa/private.h b/include/wx/osx/cocoa/private.h index dbaa1ece9f..998705a264 100644 --- a/include/wx/osx/cocoa/private.h +++ b/include/wx/osx/cocoa/private.h @@ -417,6 +417,8 @@ const short kwxCursorLast = kwxCursorWatch; extern ClassicCursor gMacCursors[]; +extern NSLayoutManager* gNSLayoutManager; + #endif #endif diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm index 9a7d446ff8..ef5aefa538 100644 --- a/src/osx/cocoa/utils.mm +++ b/src/osx/cocoa/utils.mm @@ -261,6 +261,9 @@ void wxBell() wxNSAppController* appcontroller = nil; +NSLayoutManager* gNSLayoutManager = nil; + + bool wxApp::DoInitGui() { wxMacAutoreleasePool pool; @@ -278,6 +281,8 @@ bool wxApp::DoInitGui() [NSApp finishLaunching]; #endif } + gNSLayoutManager = [[NSLayoutManager alloc] init]; + return true; } @@ -289,6 +294,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)