summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkConsole.c6
-rw-r--r--generic/tkTextBTree.c2
-rw-r--r--library/console.tcl2
-rw-r--r--library/listbox.tcl2
-rw-r--r--library/text.tcl2
-rw-r--r--macosx/tkMacOSXDraw.c10
-rw-r--r--win/tkWinDraw.c52
7 files changed, 70 insertions, 6 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index 8bfbe9b..a6a8cbf 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -318,7 +318,7 @@ Tk_InitConsoleChannels(
* Tk_CreateConsoleWindow --
*
* Initialize the console. This code actually creates a new application
- * and associated interpreter. This effectivly hides the implementation
+ * and associated interpreter. This effectively hides the implementation
* from the main application.
*
* Results:
@@ -344,9 +344,13 @@ Tk_CreateConsoleWindow(
/* Init an interp with Tcl and Tk */
Tcl_Interp *consoleInterp = Tcl_CreateInterp();
if (Tcl_Init(consoleInterp) != TCL_OK) {
+ Tcl_Obj *result_obj = Tcl_GetObjResult(consoleInterp);
+ Tcl_SetObjResult(interp, result_obj);
goto error;
}
if (Tk_Init(consoleInterp) != TCL_OK) {
+ Tcl_Obj *result_obj = Tcl_GetObjResult(consoleInterp);
+ Tcl_SetObjResult(interp, result_obj);
goto error;
}
diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c
index c20c546..81e31dc 100644
--- a/generic/tkTextBTree.c
+++ b/generic/tkTextBTree.c
@@ -799,6 +799,7 @@ RemovePixelClient(
nodePtr->numPixels[treePtr->pixelReferences-1];
}
if (treePtr->pixelReferences == 1) {
+ ckfree(nodePtr->numPixels);
nodePtr->numPixels = NULL;
} else {
nodePtr->numPixels = ckrealloc(nodePtr->numPixels,
@@ -1439,6 +1440,7 @@ TkBTreeDeleteIndexRange(
prevNodePtr->nextPtr = curNodePtr->nextPtr;
}
parentPtr->numChildren--;
+ DeleteSummaries(curNodePtr->summaryPtr);
ckfree(curNodePtr->numPixels);
ckfree(curNodePtr);
curNodePtr = parentPtr;
diff --git a/library/console.tcl b/library/console.tcl
index ba68ccc..355a43b 100644
--- a/library/console.tcl
+++ b/library/console.tcl
@@ -286,6 +286,7 @@ proc ::tk::ConsoleHistory {cmd} {
}
.console delete promptEnd end
.console insert promptEnd $cmd {input stdin}
+ .console see end
}
next {
incr HistNum
@@ -302,6 +303,7 @@ proc ::tk::ConsoleHistory {cmd} {
}
.console delete promptEnd end
.console insert promptEnd $cmd {input stdin}
+ .console see end
}
reset {
set HistNum 1
diff --git a/library/listbox.tcl b/library/listbox.tcl
index 17c03c0..1b35b3d 100644
--- a/library/listbox.tcl
+++ b/library/listbox.tcl
@@ -206,7 +206,7 @@ if {"x11" eq [tk windowingsystem]} {
# Support for mousewheels on Linux/Unix commonly comes through mapping
# the wheel to the extended buttons. If you have a mousewheel, find
# Linux configuration info at:
- # http://www.inria.fr/koala/colas/mouse-wheel-scroll/
+ # http://linuxreviews.org/howtos/xfree/mouse/
bind Listbox <4> {
if {!$tk_strictMotif} {
%W yview scroll -5 units
diff --git a/library/text.tcl b/library/text.tcl
index 2bf1b2b..9eb6e31 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -463,7 +463,7 @@ if {"x11" eq [tk windowingsystem]} {
# Support for mousewheels on Linux/Unix commonly comes through mapping
# the wheel to the extended buttons. If you have a mousewheel, find
# Linux configuration info at:
- # http://www.inria.fr/koala/colas/mouse-wheel-scroll/
+ # http://linuxreviews.org/howtos/xfree/mouse/
bind Text <4> {
if {!$tk_strictMotif} {
%W yview scroll -50 pixels
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 5ca8bfe..d1e67dc 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -858,6 +858,16 @@ XDrawLines(
CGContextAddLineToPoint(dc.context, prevx, prevy);
}
}
+ /*
+ * In the case of closed polylines, the first and last points
+ * are the same. We want miter or bevel join be rendered also
+ * at this point, this needs telling CoreGraphics that the
+ * path is closed.
+ */
+ if ((points[0].x == points[npoints-1].x) &&
+ (points[0].y == points[npoints-1].y)) {
+ CGContextClosePath(dc.context);
+ }
CGContextStrokePath(dc.context);
}
TkMacOSXRestoreDrawingContext(&dc);
diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c
index 1d17cc6..e13a5e5 100644
--- a/win/tkWinDraw.c
+++ b/win/tkWinDraw.c
@@ -741,6 +741,52 @@ XFillRectangles(
/*
*----------------------------------------------------------------------
*
+ * MakeAndStrokePath --
+ *
+ * This function draws a shape using a list of points, a stipple pattern,
+ * and the specified drawing function. It does it through creation of a
+ * so-called 'path' (see GDI documentation on MSDN).
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+MakeAndStrokePath(
+ HDC dc,
+ POINT *winPoints,
+ int npoints,
+ WinDrawFunc func) /* Name of the Windows GDI drawing function:
+ this is either Polyline or Polygon. */
+{
+ BeginPath(dc);
+ func(dc, winPoints, npoints);
+ /*
+ * In the case of closed polylines, the first and last points
+ * are the same. We want miter or bevel join be rendered also
+ * at this point, this needs telling the Windows GDI that the
+ * path is closed.
+ */
+ if (func == Polyline) {
+ if ((winPoints[0].x == winPoints[npoints-1].x) &&
+ (winPoints[0].y == winPoints[npoints-1].y)) {
+ CloseFigure(dc);
+ }
+ EndPath(dc);
+ StrokePath(dc);
+ } else {
+ EndPath(dc);
+ StrokeAndFillPath(dc);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
* RenderObject --
*
* This function draws a shape using a list of points, a stipple pattern,
@@ -833,7 +879,7 @@ RenderObject(
SetPolyFillMode(dcMem, (gc->fill_rule == EvenOddRule) ? ALTERNATE
: WINDING);
oldMemBrush = SelectObject(dcMem, CreateSolidBrush(gc->foreground));
- func(dcMem, winPoints, npoints);
+ MakeAndStrokePath(dcMem, winPoints, npoints, func);
BitBlt(dc, rect.left, rect.top, width, height, dcMem, 0, 0, COPYFG);
/*
@@ -845,7 +891,7 @@ RenderObject(
if (gc->fill_style == FillOpaqueStippled) {
DeleteObject(SelectObject(dcMem,
CreateSolidBrush(gc->background)));
- func(dcMem, winPoints, npoints);
+ MakeAndStrokePath(dcMem, winPoints, npoints, func);
BitBlt(dc, rect.left, rect.top, width, height, dcMem, 0, 0,
COPYBG);
}
@@ -861,7 +907,7 @@ RenderObject(
SetPolyFillMode(dc, (gc->fill_rule == EvenOddRule) ? ALTERNATE
: WINDING);
- func(dc, winPoints, npoints);
+ MakeAndStrokePath(dc, winPoints, npoints, func);
SelectObject(dc, oldPen);
}
DeleteObject(SelectObject(dc, oldBrush));