]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/app.cpp
fixed wxMac compilation after ShowWithEffect() changes; also fixed to use correct...
[wxWidgets.git] / src / mac / carbon / app.cpp
index 62c6ee4992f7be7332f153c0eb8f2c788a2a874e..a75a5112791edbd1017e102887922ca70e09cd54 100644 (file)
@@ -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<HICommand>(kEventParamDirectObject, command );       
+    SendEventToApplication( event );
+}