diff options
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r-- | macosx/tkMacOSXWm.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index a9b5b47..34f23b0 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXWm.c,v 1.39 2006/08/17 01:10:21 hobbs Exp $ + * RCS: @(#) $Id: tkMacOSXWm.c,v 1.40 2006/08/18 07:47:11 das Exp $ */ #include "tkMacOSXInt.h" @@ -986,14 +986,21 @@ static Tcl_Obj * WmAttrGetTitlePath(WindowRef macWindow) { FSRef ref; - AliasHandle alias; Boolean wasChanged; UInt8 path[2048]; - OSStatus err; + OSStatus err = fnfErr; - err = GetWindowProxyAlias(macWindow, &alias); - if (err == noErr) { - err = FSResolveAlias(NULL, alias, &ref, &wasChanged); +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 + if (HIWindowGetProxyFSRef != NULL) { + err = HIWindowGetProxyFSRef(macWindow, &ref); + } +#endif + if (err != noErr) { + AliasHandle alias; + err = GetWindowProxyAlias(macWindow, &alias); + if (err == noErr) { + err = FSResolveAlias(NULL, alias, &ref, &wasChanged); + } } if (err == noErr) { err = FSRefMakePath(&ref, path, 2048); |