diff options
author | das <das> | 2006-04-11 10:20:37 (GMT) |
---|---|---|
committer | das <das> | 2006-04-11 10:20:37 (GMT) |
commit | 2d354b737be50a166d088bce9e28dc42a1ac541c (patch) | |
tree | 9c11a8593b1cefd2deed0ad602b10701fd1885e8 /macosx | |
parent | cfda486fd1e5866b00b34049d23567ec4f474a79 (diff) | |
download | tk-2d354b737be50a166d088bce9e28dc42a1ac541c.zip tk-2d354b737be50a166d088bce9e28dc42a1ac541c.tar.gz tk-2d354b737be50a166d088bce9e28dc42a1ac541c.tar.bz2 |
* macosx/tkMacOSXDraw.c (TkMacOSXInitCGDrawing): prevent multiple init.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXDraw.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 917e3c7..f63f2d8 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.2.2.12 2006/03/28 02:44:13 das Exp $ + * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.2.2.13 2006/04/11 10:20:37 das Exp $ */ #include "tkMacOSXInt.h" @@ -47,9 +47,9 @@ static int useThemedFrame = 0; static unsigned char InvertByte _ANSI_ARGS_((unsigned char data)); static void TkMacOSXSetUpCGContext(MacDrawable *macWin, - CGrafPtr destPort, GC gc, CGContextRef *contextPtr); + CGrafPtr destPort, GC gc, CGContextRef *contextPtr); static void TkMacOSXReleaseCGContext(MacDrawable *macWin, CGrafPtr destPort, - CGContextRef *context); + CGContextRef *context); static inline double radians(double degrees) { return degrees * PI / 180.0f; } int @@ -61,19 +61,19 @@ TkMacOSXInitCGDrawing(interp, enable, limit) static Boolean initialized = FALSE; if (!initialized) { + initialized = TRUE; + if (Tcl_CreateNamespace(interp, "::tk::mac", NULL, NULL) == NULL) { Tcl_ResetResult(interp); } if (Tcl_LinkVar(interp, "::tk::mac::useCGDrawing", - (char *) &useCGDrawing, - TCL_LINK_BOOLEAN) != TCL_OK) { + (char *) &useCGDrawing, TCL_LINK_BOOLEAN) != TCL_OK) { Tcl_ResetResult(interp); } useCGDrawing = enable; if (Tcl_LinkVar(interp, "::tk::mac::CGAntialiasLimit", - (char *) &tkMacOSXCGAntiAliasLimit, - TCL_LINK_INT) != TCL_OK) { + (char *) &tkMacOSXCGAntiAliasLimit, TCL_LINK_INT) != TCL_OK) { Tcl_ResetResult(interp); } tkMacOSXCGAntiAliasLimit = limit; |