diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2007-01-21 14:57:42 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2007-01-21 14:57:42 +0000 |
| commit | 30be5f711b5a01e5e0d240671269608588f027d9 (patch) | |
| tree | d8d61ca4241dc78afd9c995f89b8ffdae9d6d62e /src | |
| parent | e9e0826d10ac38ab162c0407ee618d1edf93069d (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_mac.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx index 452d98774..248f181f6 100644 --- a/src/Fl_mac.cxx +++ b/src/Fl_mac.cxx @@ -1318,14 +1318,19 @@ void fl_open_display() { if( !bundle ) { + OSErr err = 1; #ifdef MAC_OS_X_VERSION_10_3 - // newer supported API - if( !TransformProcessType( &cur_psn, kProcessTransformToForegroundApplication ) ) + if (TransformProcessType != NULL) { + err = TransformProcessType(&cur_psn, kProcessTransformToForegroundApplication); + } #else - // undocumented API - if( !CPSEnableForegroundOperation( &cur_psn, 0x03, 0x3C, 0x2C, 0x1103 ) ) + if (CPSEnableForegroundOperation != NULL) { + err = CPSEnableForegroundOperation(&cur_psn, 0x03, 0x3C, 0x2C, 0x1103); + } #endif + if (err == noErr) { SetFrontProcess( &cur_psn ); + } } } } |
