summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWm.c
diff options
context:
space:
mode:
authordas <das>2006-07-20 06:25:18 (GMT)
committerdas <das>2006-07-20 06:25:18 (GMT)
commit472701c8e65c0becd4620bce71070564d0569287 (patch)
tree908cf8a88b6a313743cec6481241735b0ff1f9d2 /macosx/tkMacOSXWm.c
parent516d2a2413bfa3330b641f88c3a940a54f790a60 (diff)
downloadtk-472701c8e65c0becd4620bce71070564d0569287.zip
tk-472701c8e65c0becd4620bce71070564d0569287.tar.gz
tk-472701c8e65c0becd4620bce71070564d0569287.tar.bz2
* macosx/tkMacOSXWm.c (WmAttributesCmd, WmIconbitmapCmd): add support
* unix/tkUnixSend.c (Tk_GetUserInactiveTime): for weakly importing symbols not available on OSX 10.2 or 10.3, enables binaires built on later OSX versions to run on earlier ones. * macosx/Wish.xcodeproj/project.pbxproj: enable weak-linking; turn on extra warnings. * macosx/README: document how to enable weak-linking; cleanup. * unix/configure.in: add check on Darwin-X11 for ld support of -weak-l * unix/tcl.m4: flag and weak-link libXss if possible as it is not available before OSX 10.4; enforce requirement of OSX 10.2 for TkAqua; move Darwin specific checks & defines that are only relevant to the tcl build out of tcl.m4; restrict framework option to Darwin; cleanup quoting and help messages. * unix/configure: autoconf-2.59 * unix/tkConfig.h.in: autoheader-2.59 * macosx/GNUmakefile: enable xft for TkX11 build. * macosx/tkMacOSXFont.c (TkMacOSXQuarzStartDraw, TkMacOSXQuarzEndDraw): verify validity of context returned from QDBeginCGContext() before use. * macosx/tkMacOSXKeyEvent.c: ifdef out diagnostic messages to stderr. * macosx/tkMacOSXEvent.h: standardize MAC_OS_X_VERSION_MAX_ALLOWED * macosx/tkMacOSXMenu.c: checks per QA1316, ensure define can be * macosx/tkMacOSXMenubutton.c: overriden on command line (from default * macosx/tkMacOSXMenus.c: of current OS version). * macosx/tkMacOSXMouseEvent.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXFont.c (TkpMeasureCharsInContext): fix signed-with-unsigned comparison and other warnings from gcc4 -Wextra.
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r--macosx/tkMacOSXWm.c52
1 files changed, 27 insertions, 25 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index b8fcd3f..628fbfb 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.35 2006/05/16 07:37:17 das Exp $
+ * RCS: @(#) $Id: tkMacOSXWm.c,v 1.36 2006/07/20 06:25:19 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -22,14 +22,12 @@
#include "tkMacOSXEvent.h"
/* Define constants only available on Mac OS X 10.3 or later */
-#if !defined(MAC_OS_X_VERSION_10_3) || \
- (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3)
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030
#define kSimpleWindowClass 18
#define kWindowDoesNotCycleAttribute (1L << 15)
#endif
/* Define constants only available on Mac OS X 10.4 or later */
-#if !defined(MAC_OS_X_VERSION_10_4) || \
- (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4)
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1040
#define kWindowNoTitleBarAttribute (1L << 9)
#define kWindowMetalNoContentSeparatorAttribute (1L << 11)
#endif
@@ -880,17 +878,19 @@ Tcl_Obj *CONST objv[]; /* Argument objects. */
Boolean d;
err = FSPathMakeRef((unsigned char*) path, &ref, &d);
if (err == noErr) {
-#if defined(MAC_OS_X_VERSION_10_4) && \
- (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
- err = HIWindowSetProxyFSRef(macWindow, &ref);
-#else
- AliasHandle alias;
- err = FSNewAlias(NULL, &ref, &alias);
- if (err == noErr) {
- err = SetWindowProxyAlias(macWindow, alias);
- DisposeHandle((Handle) alias);
- }
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
+ if (HIWindowSetProxyFSRef != NULL) {
+ err = HIWindowSetProxyFSRef(macWindow, &ref);
+ } else
#endif
+ {
+ AliasHandle alias;
+ err = FSNewAlias(NULL, &ref, &alias);
+ if (err == noErr) {
+ err = SetWindowProxyAlias(macWindow, alias);
+ DisposeHandle((Handle) alias);
+ }
+ }
}
} else {
int len;
@@ -1714,17 +1714,19 @@ Tcl_Obj *CONST objv[]; /* Argument objects. */
}
macWindow = GetWindowFromPort(TkMacOSXGetDrawablePort(winPtr->window));
if (len) {
-#if defined(MAC_OS_X_VERSION_10_4) && \
- (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
- err = HIWindowSetProxyFSRef(macWindow, &ref);
-#else
- AliasHandle alias;
- err = FSNewAlias(NULL, &ref, &alias);
- if (err == noErr) {
- err = SetWindowProxyAlias(macWindow, alias);
- DisposeHandle((Handle) alias);
- }
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
+ if (HIWindowSetProxyFSRef != NULL) {
+ err = HIWindowSetProxyFSRef(macWindow, &ref);
+ } else
#endif
+ {
+ AliasHandle alias;
+ err = FSNewAlias(NULL, &ref, &alias);
+ if (err == noErr) {
+ err = SetWindowProxyAlias(macWindow, alias);
+ DisposeHandle((Handle) alias);
+ }
+ }
} else {
err = RemoveWindowProxy(macWindow);
if (wmPtr->hints.icon_pixmap != None) {