X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/204abcd474fa99071b7bb5b00f7e212b0bde16dc..5c7b506103cfc078a821860766e31c47d595e07f:/src/mac/carbon/app.cpp diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index 566f3a34a7..749119f1bf 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -822,7 +822,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv) CFRelease( url ) ; CFStringRef path = CFURLCopyFileSystemPath ( urlParent , kCFURLPOSIXPathStyle ) ; CFRelease( urlParent ) ; - wxString cwd = wxMacCFStringHolder(path).AsString(wxLocale::GetSystemEncoding()); + wxString cwd = wxCFStringRef(path).AsString(wxLocale::GetSystemEncoding()); wxSetWorkingDirectory( cwd ) ; } @@ -1635,3 +1635,14 @@ void wxApp::MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymess event.SetTimestamp(when); event.SetEventObject(focus); } + + +void wxApp::MacHideApp() +{ + wxMacCarbonEvent event( kEventClassCommand , kEventCommandProcess ); + HICommand command; + memset( &command, 0 , sizeof(command) ); + command.commandID = kHICommandHide ; + event.SetParameter(kEventParamDirectObject, command ); + SendEventToApplication( event ); +}