Add MacHideApp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -124,6 +124,9 @@ public:
|
|||||||
// in response of a reopen-application apple event
|
// in response of a reopen-application apple event
|
||||||
virtual void MacReopenApp() ;
|
virtual void MacReopenApp() ;
|
||||||
|
|
||||||
|
// Hide the application windows the same as the system hide command would do it.
|
||||||
|
void MacHideApp();
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1635,3 +1635,14 @@ void wxApp::MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymess
|
|||||||
event.SetTimestamp(when);
|
event.SetTimestamp(when);
|
||||||
event.SetEventObject(focus);
|
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 );
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user