*** empty log message ***

This commit is contained in:
gephilipp 2007-10-10 17:44:57 +00:00
parent 2cf830835e
commit 4ac569d2bc

View File

@ -871,18 +871,18 @@ void osxGraphicsWindow::close_window()
// HACK ALLERT ************ Undocumented OSX calls... // HACK ALLERT ************ Undocumented OSX calls...
// I can not find any other way to get the mouse focus to a window in OSX.. // I can not find any other way to get the mouse focus to a window in OSX..
// //
extern "C" { //extern "C" {
struct CPSProcessSerNum // struct CPSProcessSerNum
{ // {
UInt32 lo; // UInt32 lo;
UInt32 hi; // UInt32 hi;
}; // };
extern OSErr CPSGetCurrentProcess(CPSProcessSerNum *psn); //extern OSErr CPSGetCurrentProcess(CPSProcessSerNum *psn);
extern OSErr CPSEnableForegroundOperation( struct CPSProcessSerNum *psn); //extern OSErr CPSEnableForegroundOperation( struct CPSProcessSerNum *psn);
extern OSErr CPSSetProcessName ( struct CPSProcessSerNum *psn, char *processname); //extern OSErr CPSSetProcessName ( struct CPSProcessSerNum *psn, char *processname);
extern OSErr CPSSetFrontProcess( struct CPSProcessSerNum *psn); //extern OSErr CPSSetFrontProcess( struct CPSProcessSerNum *psn);
}; //};
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: osxGraphicsWindow::open_window // Function: osxGraphicsWindow::open_window
@ -943,17 +943,21 @@ bool osxGraphicsWindow::OSOpenWindow(WindowProperties &req_properties)
err = InstallApplicationEventHandler (gEvtHandler, GetEventTypeCount (list1) , list1, this, &ref1 ); err = InstallApplicationEventHandler (gEvtHandler, GetEventTypeCount (list1) , list1, this, &ref1 );
GlobalInits = true; GlobalInits = true;
struct CPSProcessSerNum PSN; ProcessSerialNumber psn = { 0, kCurrentProcess };
GetCurrentProcess((ProcessSerialNumber *)&PSN); TransformProcessType(&psn, kProcessTransformToForegroundApplication);
err = CPSGetCurrentProcess(&PSN); SetFrontProcess(&psn);
if (req_properties.has_title()) // struct CPSProcessSerNum PSN;
err = CPSSetProcessName(&PSN,(char *)req_properties.get_title().c_str()); // GetCurrentProcess((ProcessSerialNumber *)&PSN);
else // err = CPSGetCurrentProcess(&PSN);
err = CPSSetProcessName(&PSN,"");
err = CPSEnableForegroundOperation(&PSN); // if (req_properties.has_title())
err = CPSSetFrontProcess(&PSN); // err = CPSSetProcessName(&PSN,(char *)req_properties.get_title().c_str());
// else
// err = CPSSetProcessName(&PSN,"");
// err = CPSEnableForegroundOperation(&PSN);
// err = CPSSetFrontProcess(&PSN);
} }
if (req_properties.has_fullscreen() && req_properties.get_fullscreen()) if (req_properties.has_fullscreen() && req_properties.get_fullscreen())