mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 16:12:13 +08:00
Added code to support OS X weak'n;lazy linking.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5628 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+9
-4
@@ -1318,17 +1318,22 @@ void fl_open_display() {
|
|||||||
|
|
||||||
if( !bundle )
|
if( !bundle )
|
||||||
{
|
{
|
||||||
|
OSErr err = 1;
|
||||||
#ifdef MAC_OS_X_VERSION_10_3
|
#ifdef MAC_OS_X_VERSION_10_3
|
||||||
// newer supported API
|
if (TransformProcessType != NULL) {
|
||||||
if( !TransformProcessType( &cur_psn, kProcessTransformToForegroundApplication ) )
|
err = TransformProcessType(&cur_psn, kProcessTransformToForegroundApplication);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
// undocumented API
|
if (CPSEnableForegroundOperation != NULL) {
|
||||||
if( !CPSEnableForegroundOperation( &cur_psn, 0x03, 0x3C, 0x2C, 0x1103 ) )
|
err = CPSEnableForegroundOperation(&cur_psn, 0x03, 0x3C, 0x2C, 0x1103);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (err == noErr) {
|
||||||
SetFrontProcess( &cur_psn );
|
SetFrontProcess( &cur_psn );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user