X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dbe4a80c57a77b249ef32117efe9fd923066f958..8691bf118c80d22b0e6908a0877b46cedde7a3eb:/src/mac/carbon/app.cpp diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index 62c6ee4992..a75a511279 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -1472,7 +1472,7 @@ bool wxApp::MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers bool handled = false ; - wxTopLevelWindowMac *tlw = focus->MacGetTopLevelWindow() ; + wxNonOwnedWindow *tlw = focus->MacGetTopLevelWindow() ; if (tlw) { @@ -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 ); +}