summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README2
-rw-r--r--changes102
-rw-r--r--doc/bind.n24
-rw-r--r--doc/canvas.n9
-rw-r--r--doc/text.n2
-rw-r--r--generic/tk.h4
-rw-r--r--generic/tkCanvas.c25
-rw-r--r--generic/tkConsole.c6
-rw-r--r--generic/tkFont.c14
-rw-r--r--generic/tkImgGIF.c1
-rw-r--r--generic/tkImgPhoto.c34
-rw-r--r--generic/tkRectOval.c102
-rw-r--r--generic/tkText.c1
-rw-r--r--generic/tkTextBTree.c2
-rw-r--r--generic/ttk/ttkNotebook.c7
-rw-r--r--library/console.tcl2
-rw-r--r--library/fontchooser.tcl3
-rw-r--r--library/listbox.tcl2
-rw-r--r--library/menu.tcl1
-rw-r--r--library/text.tcl2
-rw-r--r--library/tk.tcl2
-rw-r--r--macosx/Tk.xcode/project.pbxproj2
-rw-r--r--macosx/Tk.xcodeproj/project.pbxproj2
-rw-r--r--macosx/tkMacOSXDialog.c81
-rw-r--r--macosx/tkMacOSXDraw.c10
-rw-r--r--tests/corruptMangled.gifbin64 -> 0 bytes
-rw-r--r--tests/corruptMangled4G.gif2
-rw-r--r--tests/corruptTruncated.gifbin32 -> 0 bytes
-rw-r--r--tests/font.test10
-rw-r--r--tests/imgPhoto.test161
-rw-r--r--tests/red.gifbin92 -> 0 bytes
-rw-r--r--tests/text.test10
-rwxr-xr-xunix/configure2
-rw-r--r--unix/configure.in2
-rw-r--r--unix/tk.spec2
-rw-r--r--unix/tkUnixSelect.c7
-rwxr-xr-xwin/configure2
-rw-r--r--win/configure.in2
-rw-r--r--win/makefile.vc10
-rw-r--r--win/rules.vc23
-rw-r--r--win/tkWinDraw.c52
-rw-r--r--win/ttkWinMonitor.c11
42 files changed, 124 insertions, 614 deletions
diff --git a/README b/README
index 7bd26e5..c960e13 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
README: Tk
- This is the Tk 8.6.7 source distribution.
+ This is the Tk 8.6.6 source distribution.
http://sourceforge.net/projects/tcl/files/Tcl/
You can get any source release of Tk from the URL above.
diff --git a/changes b/changes
index 72cd705..89434c8 100644
--- a/changes
+++ b/changes
@@ -7313,105 +7313,3 @@ Tk Cocoa 2.0: More drawing internals refinements (culler,walzer)
2016-07-21 (bug)[450bb0] Aqua: memory corruption from [tk busy] (porter)
--- Released 8.6.6, July 27, 2016 --- http://core.tcl.tk/tk/ for details
-
-2016-08-23 (bug)[a2abc4] Wrong warp cursor position on 2nd display (vogel)
-
-2016-08-29 (bug)[fa3229] menu-38.1 (calvo,vogel)
-
-2016-08-29 (bug)[2cf3d6] button-5.24 (vogel)
-
-2016-09-04 (bug)[1534455,2945130] Key release events get _L vs _R right. (vogel)
-
-2016-09-10 (bug)[8c4216] listbox-4.1 (vogel)
-
-2016-09-10 (bug)[eb2681] listbox-13.1 (vogel)
-
-2016-09-21 (bug)[3126428] ttk::button react to image change (thoyts)
-
-2016-10-09 (bug)[1082213] wrapped text don't start lines with whitespace (vogel)
-
-2016-10-12 (bug)[3217462] tri-state button on non-native theme (vogel)
-
-2016-10-30 (bug)[3588460] Fix file dialog -typevariable (vogel)
-
-2016-11-01 (bug)[e36963] event generate .e <diaeresis> (matthias,vogel)
-
-2016-11-05 (bug)[6aea69] grid-23 (danckaert,vogel)
-
-2016-11-18 (bug)[f60c54] combobox-3 (panza,vogel)
-
-2017-01-03 (bug)[f32502] crash drawing many dashed objects (reithofer,werner)
-
-2017-01-05 (bug)[dac92f] text-2.[89] (vogel)
-
-2017-01-07 (bug)[3df559] OSX: Negative bbox width (vogel)
-
-2017-01-07 (bug)[28a453] OSX: text widget index OBOE (vogel)
-
-2017-01-07 (bug)[c12af7] OSX: text-21.1 (vogel)
-
-2017-01-08 (bug)[7a838c] X11 ring buffer overflow (werner)
-
-2017-01-11 (bug)[d4fb4e] imgPhoto-4.75 (nijtmans)
-
-2017-01-18 (bug)[fab5fe] OSX: repair textDisp failures (vogel)
-
-2017-01-23 (bug)[89a638] OSX: textDisp-15.8 (vogel)
-
-2017-01-25 (bug)[1403ea] Limits on text line size on Windows (spjuth)
-
-2017-02-05 (bug)[ae32eb] textDisp fails in text custom config (vogel)
-
-2017-02-05 (bug)[7d967c] crash after IME restart (lanam,nijtmans)
-
-2017-02-22 (bug)[c492c9] disabled combobox arrow appearance (danckaert)
-
-2017-03-06 (bug)[6b3644] Fix -alpha for 16-bit color PNG (LemonMan)
-
-2017-03-11 (bug)[775273] artifacts on Ubuntu 16.10+ (nemethi)
-
-2n017-03-26 (TIP 464) Win multimedia keys support (fassel,vogel)
-
-2017-03-29 (bug)[28a3c3] test BTree memleaks plugged (anonymous)
-
-2017-04-06 (bug)[db8c54] Stop freed mem access in warp pointer callback (porter)
-
-2017-04-07 (bugs) Fix calculation of ttk::notebook tab widths (vogel)
-
-2017-04-07 (bug)[291296] notebook tab management (decoster)
-
-2017-04-08 (bug)[f0188a] Win reject invalid hex color codes (bachmann)
-
-2017-04-10 (bug)[3f323b] variable struct size on XCode 8.3.1 (auriocus)
-
-2017-04-20 (bug)[061bf9] OSX scrollbar draw position (reincke,walzer,joye)
-
-2017-05-01 (bug) restore -initialfile for OSX file dialogs (reincke,gollwitzer)
-
-2017-05-06 (bug) OSX file dialog type filters (walzer)
-
-2017-05-10 (bug)[a5ba1c] race condition on Win clipboard cleanup (donchenko)
-
-2017-05-18 (bug)[2433781] center image on button (cramer)
-
-2017-05-19 (bug)[434d29] type mismatch with recent Xft (nijtmans,werner)
-
-2017-06-02 (bug)[bc43fd] paneconfigure get pane heights right (vogel)
-
-2017-06-21 (bug)[adc028] menu avoid unreleasable global grab (nash)
-
-2017-06-30 (bug)[92e028,c5eb90] User switch forced theme reset (lanam)
-
-2017-06-30 (bug)[62c5b7] segfault in [text] replace (werner)
-
-2017-07-03 (bug)[8afc6c] OSX crash in save/open dialogs (simpson,walzer)
-
-2017-08-02 (bug)[b601ce] Resource exhaustion processing corrupt GIF (nash)
-
-2017-08-03 (bug)[9eab54] Fix -initialdir for OSX file dialogs (gollwitzer)
-
-2017-08-08 (bug)[28d0b8] Follow ICCCM advice on X selection protocol (donchenko)
-
-2017-08-08 (bug)[4966ca] Scidb race in notebook tab selection (cramer)
-
---- Released 8.6.7, August 9, 2017 --- http://core.tcl.tk/tk/ for details
diff --git a/doc/bind.n b/doc/bind.n
index c260bce..d189376 100644
--- a/doc/bind.n
+++ b/doc/bind.n
@@ -19,10 +19,9 @@ bind \- Arrange for X events to invoke Tcl scripts
.PP
The \fBbind\fR command associates Tcl scripts with X events.
If all three arguments are specified, \fBbind\fR will
-arrange for \fIscript\fR (a Tcl script called the
-.QW "binding script")
-to be evaluated whenever the event(s) given by \fIsequence\fR
-occur in the window(s) identified by \fItag\fR.
+arrange for \fIscript\fR (a Tcl script) to be evaluated whenever
+the event(s) given by \fIsequence\fR occur in the window(s)
+identified by \fItag\fR.
If \fIscript\fR is prefixed with a
.QW + ,
then it is appended to
@@ -388,8 +387,7 @@ For example, \fB<Control\-comma>\fR is equivalent to
\fB<Control\-KeyPress\-comma>\fR.
.SH "BINDING SCRIPTS AND SUBSTITUTIONS"
.PP
-The \fIscript\fR argument to \fBbind\fR is a Tcl script, called the
-.QW "binding script",
+The \fIscript\fR argument to \fBbind\fR is a Tcl script,
which will be executed whenever the given event sequence occurs.
\fICommand\fR will be executed in the same interpreter that the
\fBbind\fR command was executed in, and it will run at global
@@ -608,21 +606,13 @@ the window.
.PP
The \fBcontinue\fR and \fBbreak\fR commands may be used inside a
binding script to control the processing of matching scripts.
-If \fBcontinue\fR is invoked within a binding script, then this
-binding script, including all other
-.QW +
-appended scripts, is terminated but Tk will continue processing
-binding scripts associated with other \fItag\fR's.
+If \fBcontinue\fR is invoked, then the current binding script
+is terminated but Tk will continue processing binding scripts
+associated with other \fItag\fR's.
If the \fBbreak\fR command is invoked within a binding script,
then that script terminates and no other scripts will be invoked
for the event.
.PP
-Within a script called from the binding script, \fBreturn\fR
-\fB-code ok\fR may be used to continue processing (including
-.QW +
-appended scripts), or \fBreturn\fR \fB-code break\fR may be used to
-stop processing all other binding scripts.
-.PP
If more than one binding matches a particular event and they
have the same \fItag\fR, then the most specific binding
is chosen and its script is evaluated.
diff --git a/doc/canvas.n b/doc/canvas.n
index 5b65283..38697cd 100644
--- a/doc/canvas.n
+++ b/doc/canvas.n
@@ -547,15 +547,6 @@ If coordinates are specified, then they replace the current
coordinates for the named item.
If \fItagOrId\fR refers to multiple items, then
the first one in the display list is used.
-.RS
-.PP
-Note that for rectangles, ovals and arcs the returned list of coordinates
-has a fixed order, namely the left, top, right and bottom coordinates,
-which may not be the order originally given. Also the coordinates are always
-returned in screen units with no units (that is, in pixels). So if the
-original coordinates were specified for instance in centimeters or inches,
-the returned values will nevertheless be in pixels.
-.RE
.TP
\fIpathName \fBcreate \fItype x y \fR?\fIx y ...\fR? ?\fIoption value ...\fR?
.TP
diff --git a/doc/text.n b/doc/text.n
index 2a161e6..ae9b857 100644
--- a/doc/text.n
+++ b/doc/text.n
@@ -537,7 +537,7 @@ character of that display line.
\fB\-rmargincolor \fIcolor\fR
.
\fIColor\fR specifies the background color to use in regions that do not
-contain characters because they are indented by \fB\-rmargin\fR. It may
+contain characters because they are indented by \fB\-rmargin1\fR. It may
have any of the forms accepted by \fBTk_GetColor\fR. If \fIcolor\fR has not
been specified, or if it is specified as an empty string, then the color
used is specified by the \fB-background\fR tag option (or, if this is also
diff --git a/generic/tk.h b/generic/tk.h
index a6e3726..29c6fb9 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -75,10 +75,10 @@ extern "C" {
#define TK_MAJOR_VERSION 8
#define TK_MINOR_VERSION 6
#define TK_RELEASE_LEVEL TCL_FINAL_RELEASE
-#define TK_RELEASE_SERIAL 7
+#define TK_RELEASE_SERIAL 6
#define TK_VERSION "8.6"
-#define TK_PATCH_LEVEL "8.6.7"
+#define TK_PATCH_LEVEL "8.6.6"
/*
* A special definition used to allow this header file to be included from
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index ecabe22..9c4d60a 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -1186,8 +1186,8 @@ CanvasWidgetCmd(
FOR_EVERY_CANVAS_ITEM_MATCHING(objv[2], &searchPtr, goto doneImove) {
int index;
- int x1, x2, y1, y2;
- int dontRedraw1, dontRedraw2;
+ int x1,x2,y1,y2;
+ int dontRedraw1,dontRedraw2;
/*
* The TK_MOVABLE_POINTS flag should only be set for types that
@@ -1217,11 +1217,11 @@ CanvasWidgetCmd(
itemPtr->redraw_flags &= ~TK_ITEM_DONT_REDRAW;
ItemDelChars(canvasPtr, itemPtr, index, index);
- dontRedraw1 = itemPtr->redraw_flags & TK_ITEM_DONT_REDRAW;
+ dontRedraw1=itemPtr->redraw_flags & TK_ITEM_DONT_REDRAW;
itemPtr->redraw_flags &= ~TK_ITEM_DONT_REDRAW;
ItemInsert(canvasPtr, itemPtr, index, tmpObj);
- dontRedraw2 = itemPtr->redraw_flags & TK_ITEM_DONT_REDRAW;
+ dontRedraw2=itemPtr->redraw_flags & TK_ITEM_DONT_REDRAW;
if (!(dontRedraw1 && dontRedraw2)) {
Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,
@@ -1334,7 +1334,7 @@ CanvasWidgetCmd(
}
case CANV_DCHARS: {
int first, last;
- int x1, x2, y1, y2;
+ int x1,x2,y1,y2;
if ((objc != 4) && (objc != 5)) {
Tcl_WrongNumArgs(interp, 2, objv, "tagOrId first ?last?");
@@ -1362,7 +1362,7 @@ CanvasWidgetCmd(
/*
* Redraw both item's old and new areas: it's possible that a
* delete could result in a new area larger than the old area.
- * Except if the dCharsProc sets the TK_ITEM_DONT_REDRAW flag,
+ * Except if the insertProc sets the TK_ITEM_DONT_REDRAW flag,
* nothing more needs to be done.
*/
@@ -1572,7 +1572,7 @@ CanvasWidgetCmd(
}
case CANV_INSERT: {
int beforeThis;
- int x1, x2, y1, y2;
+ int x1,x2,y1,y2;
if (objc != 5) {
Tcl_WrongNumArgs(interp, 2, objv, "tagOrId beforeThis string");
@@ -1800,8 +1800,7 @@ CanvasWidgetCmd(
}
case CANV_RCHARS: {
int first, last;
- int x1, x2, y1, y2;
- int dontRedraw1, dontRedraw2;
+ int x1,x2,y1,y2;
if (objc != 6) {
Tcl_WrongNumArgs(interp, 2, objv, "tagOrId first last string");
@@ -1832,16 +1831,12 @@ CanvasWidgetCmd(
x1 = itemPtr->x1; y1 = itemPtr->y1;
x2 = itemPtr->x2; y2 = itemPtr->y2;
+ itemPtr->redraw_flags &= ~TK_ITEM_DONT_REDRAW;
- itemPtr->redraw_flags &= ~TK_ITEM_DONT_REDRAW;
ItemDelChars(canvasPtr, itemPtr, first, last);
- dontRedraw1 = itemPtr->redraw_flags & TK_ITEM_DONT_REDRAW;
-
- itemPtr->redraw_flags &= ~TK_ITEM_DONT_REDRAW;
ItemInsert(canvasPtr, itemPtr, first, objv[5]);
- dontRedraw2 = itemPtr->redraw_flags & TK_ITEM_DONT_REDRAW;
- if (!(dontRedraw1 && dontRedraw2)) {
+ if (!(itemPtr->redraw_flags & TK_ITEM_DONT_REDRAW)) {
Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,
x1, y1, x2, y2);
EventuallyRedrawItem(canvasPtr, itemPtr);
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index a6a8cbf..8bfbe9b 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 effectively hides the implementation
+ * and associated interpreter. This effectivly hides the implementation
* from the main application.
*
* Results:
@@ -344,13 +344,9 @@ 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/tkFont.c b/generic/tkFont.c
index 86fdd87..4183686 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -3151,13 +3151,14 @@ TkIntersectAngledTextLayout(
cy[0] = cy[1] = chunkPtr->y - fontPtr->fm.ascent;
cx[1] = cx[2] = chunkPtr->x + chunkPtr->displayWidth;
cy[2] = cy[3] = chunkPtr->y + fontPtr->fm.descent;
- if ( PointInQuadrilateral(cx, cy, rx[0], ry[0]) &&
- PointInQuadrilateral(cx, cy, rx[1], ry[1]) &&
- PointInQuadrilateral(cx, cy, rx[2], ry[2]) &&
- PointInQuadrilateral(cx, cy, rx[3], ry[3])) {
- return 0;
- }
+ if ( !PointInQuadrilateral(cx, cy, rx[0], ry[0]) ||
+ !PointInQuadrilateral(cx, cy, rx[1], ry[1]) ||
+ !PointInQuadrilateral(cx, cy, rx[2], ry[2]) ||
+ !PointInQuadrilateral(cx, cy, rx[3], ry[3])) {
+ goto notReverseInside;
+ }
}
+ return 0;
/*
* If we're overlapping now, we must be partially in and out of at least
@@ -3165,6 +3166,7 @@ TkIntersectAngledTextLayout(
* rectangle that is touching or crossing a line segment of a chunk.
*/
+ notReverseInside:
chunkPtr = layoutPtr->chunks;
for (i=0 ; i<layoutPtr->numChunks ; i++,chunkPtr++) {
diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c
index be90f06..1c28b54 100644
--- a/generic/tkImgGIF.c
+++ b/generic/tkImgGIF.c
@@ -1571,7 +1571,6 @@ Fread(
}
memcpy(dst, handle->data, (size_t) (hunk * count));
handle->data += hunk * count;
- handle->length -= hunk * count;
return (int)(hunk * count);
}
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index cb46c41..1fec208 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -625,24 +625,7 @@ ImgPhotoCmd(
}
/*
- * Copy the image data over using Tk_PhotoPutZoomedBlock.
- */
-
- block.pixelPtr += options.fromX * block.pixelSize
- + options.fromY * block.pitch;
- block.width = options.fromX2 - options.fromX;
- block.height = options.fromY2 - options.fromY;
- result = Tk_PhotoPutZoomedBlock(interp, (Tk_PhotoHandle) masterPtr,
- &block, options.toX, options.toY, options.toX2 - options.toX,
- options.toY2 - options.toY, options.zoomX, options.zoomY,
- options.subsampleX, options.subsampleY,
- options.compositingRule);
-
- /*
* Set the destination image size if the -shrink option was specified.
- * This has to be done _after_ copying the data. Otherwise, if source
- * and destination are the same image, block.pixelPtr would point to
- * an invalid memory block (bug [5239fd749b]).
*/
if (options.options & OPT_SHRINK) {
@@ -654,9 +637,20 @@ ImgPhotoCmd(
return TCL_ERROR;
}
}
- Tk_ImageChanged(masterPtr->tkMaster, 0, 0, 0, 0,
- masterPtr->width, masterPtr->height);
- return result;
+
+ /*
+ * Copy the image data over using Tk_PhotoPutZoomedBlock.
+ */
+
+ block.pixelPtr += options.fromX * block.pixelSize
+ + options.fromY * block.pitch;
+ block.width = options.fromX2 - options.fromX;
+ block.height = options.fromY2 - options.fromY;
+ return Tk_PhotoPutZoomedBlock(interp, (Tk_PhotoHandle) masterPtr,
+ &block, options.toX, options.toY, options.toX2 - options.toX,
+ options.toY2 - options.toY, options.zoomX, options.zoomY,
+ options.subsampleX, options.subsampleY,
+ options.compositingRule);
case PHOTO_DATA: {
char *data;
diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c
index 4d48fe7..50b5f1a 100644
--- a/generic/tkRectOval.c
+++ b/generic/tkRectOval.c
@@ -759,103 +759,11 @@ DisplayRectOval(
&x1, &y1);
Tk_CanvasDrawableCoords(canvas, rectOvalPtr->bbox[2],rectOvalPtr->bbox[3],
&x2, &y2);
- if (x2 == x1) {
-
- /*
- * The width of the bounding box corresponds to less than one pixel
- * on screen. Adjustment is needed to avoid drawing attempts with zero
- * width items (which would draw nothing). The bounding box spans
- * either 1 or 2 pixels. Select which pixel will be drawn.
- */
-
- short ix1 = (short) (rectOvalPtr->bbox[0]);
- short ix2 = (short) (rectOvalPtr->bbox[2]);
-
- if (ix1 == ix2) {
-
- /*
- * x1 and x2 are "within the same pixel". Use this pixel.
- * Note: the degenerated case (bbox[0]==bbox[2]) of a completely
- * flat box results in arbitrary selection of the pixel at the
- * right (with positive coordinate) or left (with negative
- * coordinate) of the box. There is no "best choice" here.
- */
-
- if (ix1 > 0) {
- x2 += 1;
- } else {
- x1 -= 1;
- }
- } else {
-
- /*
- * (x1,x2) span two pixels. Select the one with the larger
- * covered "area".
- */
-
- if (ix1 > 0) {
- if ((rectOvalPtr->bbox[2] - ix2) > (ix2 - rectOvalPtr->bbox[0])) {
- x2 += 1;
- } else {
- x1 -= 1;
- }
- } else {
- if ((rectOvalPtr->bbox[2] - ix1) > (ix1 - rectOvalPtr->bbox[0])) {
- x2 += 1;
- } else {
- x1 -= 1;
- }
- }
- }
- }
- if (y2 == y1) {
-
- /*
- * The height of the bounding box corresponds to less than one pixel
- * on screen. Adjustment is needed to avoid drawing attempts with zero
- * height items (which would draw nothing). The bounding box spans
- * either 1 or 2 pixels. Select which pixel will be drawn.
- */
-
- short iy1 = (short) (rectOvalPtr->bbox[1]);
- short iy2 = (short) (rectOvalPtr->bbox[3]);
-
- if (iy1 == iy2) {
-
- /*
- * y1 and y2 are "within the same pixel". Use this pixel.
- * Note: the degenerated case (bbox[1]==bbox[3]) of a completely
- * flat box results in arbitrary selection of the pixel below
- * (with positive coordinate) or above (with negative coordinate)
- * the box. There is no "best choice" here.
- */
-
- if (iy1 > 0) {
- y2 += 1;
- } else {
- y1 -= 1;
- }
- } else {
-
- /*
- * (y1,y2) span two pixels. Select the one with the larger
- * covered "area".
- */
-
- if (iy1 > 0) {
- if ((rectOvalPtr->bbox[3] - iy2) > (iy2 - rectOvalPtr->bbox[1])) {
- y2 += 1;
- } else {
- y1 -= 1;
- }
- } else {
- if ((rectOvalPtr->bbox[3] - iy1) > (iy1 - rectOvalPtr->bbox[1])) {
- y2 += 1;
- } else {
- y1 -= 1;
- }
- }
- }
+ if (x2 <= x1) {
+ x2 = x1+1;
+ }
+ if (y2 <= y1) {
+ y2 = y1+1;
}
/*
diff --git a/generic/tkText.c b/generic/tkText.c
index e0dcc50..6ff1db9 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -1491,7 +1491,6 @@ TextWidgetObjCmd(
* Move the insertion position to the correct place.
*/
- indexFromPtr = TkTextGetIndexFromObj(interp, textPtr, objv[2]);
TkTextIndexForwChars(NULL, indexFromPtr,
deleteInsertOffset, &index, COUNT_INDICES);
TkBTreeUnlinkSegment(textPtr->insertMarkPtr,
diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c
index 81e31dc..c20c546 100644
--- a/generic/tkTextBTree.c
+++ b/generic/tkTextBTree.c
@@ -799,7 +799,6 @@ RemovePixelClient(
nodePtr->numPixels[treePtr->pixelReferences-1];
}
if (treePtr->pixelReferences == 1) {
- ckfree(nodePtr->numPixels);
nodePtr->numPixels = NULL;
} else {
nodePtr->numPixels = ckrealloc(nodePtr->numPixels,
@@ -1440,7 +1439,6 @@ TkBTreeDeleteIndexRange(
prevNodePtr->nextPtr = curNodePtr->nextPtr;
}
parentPtr->numChildren--;
- DeleteSummaries(curNodePtr->summaryPtr);
ckfree(curNodePtr->numPixels);
ckfree(curNodePtr);
curNodePtr = parentPtr;
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index 56439a6..83d7db9 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -627,12 +627,9 @@ static void SelectTab(Notebook *nb, int index)
Ttk_UnmapSlave(nb->notebook.mgr, currentIndex);
}
- /* Must be set before calling NotebookPlaceSlave(), otherwise it may
- * happen that NotebookPlaceSlaves(), triggered by an interveaning
- * geometry request, will swap to old index. */
- nb->notebook.currentIndex = index;
-
NotebookPlaceSlave(nb, index);
+
+ nb->notebook.currentIndex = index;
TtkRedisplayWidget(&nb->core);
TtkSendVirtualEvent(nb->core.tkwin, "NotebookTabChanged");
diff --git a/library/console.tcl b/library/console.tcl
index 355a43b..ba68ccc 100644
--- a/library/console.tcl
+++ b/library/console.tcl
@@ -286,7 +286,6 @@ proc ::tk::ConsoleHistory {cmd} {
}
.console delete promptEnd end
.console insert promptEnd $cmd {input stdin}
- .console see end
}
next {
incr HistNum
@@ -303,7 +302,6 @@ 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/fontchooser.tcl b/library/fontchooser.tcl
index 5395acb..8f91ade 100644
--- a/library/fontchooser.tcl
+++ b/library/fontchooser.tcl
@@ -65,9 +65,6 @@ proc ::tk::fontchooser::Show {} {
wm transient $S(W) [winfo toplevel $S(-parent)]
tk::PlaceWindow $S(W) widget $S(-parent)
}
- set S(fonts) [lsort -dictionary [font families]]
- set S(fonts,lcase) {}
- foreach font $S(fonts) { lappend S(fonts,lcase) [string tolower $font]}
wm deiconify $S(W)
}
diff --git a/library/listbox.tcl b/library/listbox.tcl
index 1b35b3d..17c03c0 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://linuxreviews.org/howtos/xfree/mouse/
+ # http://www.inria.fr/koala/colas/mouse-wheel-scroll/
bind Listbox <4> {
if {!$tk_strictMotif} {
%W yview scroll -5 units
diff --git a/library/menu.tcl b/library/menu.tcl
index e1c94c9..b5dd88e 100644
--- a/library/menu.tcl
+++ b/library/menu.tcl
@@ -170,7 +170,6 @@ bind Menu <<NextLine>> {
}
bind Menu <KeyPress> {
tk::TraverseWithinMenu %W %A
- break
}
# The following bindings apply to all windows, and are used to
diff --git a/library/text.tcl b/library/text.tcl
index 9eb6e31..2bf1b2b 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://linuxreviews.org/howtos/xfree/mouse/
+ # http://www.inria.fr/koala/colas/mouse-wheel-scroll/
bind Text <4> {
if {!$tk_strictMotif} {
%W yview scroll -50 pixels
diff --git a/library/tk.tcl b/library/tk.tcl
index fc61c4d..691bf83 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -11,7 +11,7 @@
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
# Verify that we have Tk binary and script components from the same release
-package require -exact Tk 8.6.7
+package require -exact Tk 8.6.6
# Create a ::tk namespace
namespace eval ::tk {
diff --git a/macosx/Tk.xcode/project.pbxproj b/macosx/Tk.xcode/project.pbxproj
index 93143f7..cef835d 100644
--- a/macosx/Tk.xcode/project.pbxproj
+++ b/macosx/Tk.xcode/project.pbxproj
@@ -1983,6 +1983,7 @@
F96D447008F272BA004A47F5 /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F96D447108F272BA004A47F5 /* buildall.vc.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = buildall.vc.bat; sourceTree = "<group>"; };
F96D447208F272BA004A47F5 /* cat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cat.c; sourceTree = "<group>"; };
+ F96D447308F272BA004A47F5 /* coffbase.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = coffbase.txt; sourceTree = "<group>"; };
F96D447408F272BA004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
F96D447508F272BA004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
F96D447708F272BA004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
@@ -3815,6 +3816,7 @@
F96D447008F272BA004A47F5 /* aclocal.m4 */,
F96D447108F272BA004A47F5 /* buildall.vc.bat */,
F96D447208F272BA004A47F5 /* cat.c */,
+ F96D447308F272BA004A47F5 /* coffbase.txt */,
F96D447408F272BA004A47F5 /* configure */,
F96D447508F272BA004A47F5 /* configure.in */,
F96D447708F272BA004A47F5 /* Makefile.in */,
diff --git a/macosx/Tk.xcodeproj/project.pbxproj b/macosx/Tk.xcodeproj/project.pbxproj
index 53ebe3e..e642185 100644
--- a/macosx/Tk.xcodeproj/project.pbxproj
+++ b/macosx/Tk.xcodeproj/project.pbxproj
@@ -1983,6 +1983,7 @@
F96D447008F272BA004A47F5 /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F96D447108F272BA004A47F5 /* buildall.vc.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = buildall.vc.bat; sourceTree = "<group>"; };
F96D447208F272BA004A47F5 /* cat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cat.c; sourceTree = "<group>"; };
+ F96D447308F272BA004A47F5 /* coffbase.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = coffbase.txt; sourceTree = "<group>"; };
F96D447408F272BA004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
F96D447508F272BA004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
F96D447708F272BA004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
@@ -3815,6 +3816,7 @@
F96D447008F272BA004A47F5 /* aclocal.m4 */,
F96D447108F272BA004A47F5 /* buildall.vc.bat */,
F96D447208F272BA004A47F5 /* cat.c */,
+ F96D447308F272BA004A47F5 /* coffbase.txt */,
F96D447408F272BA004A47F5 /* configure */,
F96D447508F272BA004A47F5 /* configure.in */,
F96D447708F272BA004A47F5 /* Makefile.in */,
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index 1383225..3397f71 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -159,23 +159,6 @@ static const short alertNativeButtonIndexAndTypeToButtonIndex[][3] = {
[TYPE_YESNOCANCEL] = {5, 6, 4},
};
-/*
- * Construct a file URL from directory and filename. Either may
- * be nil. If both are nil, returns nil.
- */
-#if MAC_OS_X_VERSION_MIN_REQUIRED > 1050
-static NSURL *getFileURL(NSString *directory, NSString *filename) {
- NSURL *url = nil;
- if (directory) {
- url = [NSURL fileURLWithPath:directory isDirectory:YES];
- }
- if (filename) {
- url = [NSURL URLWithString:filename relativeToURL:url];
- }
- return url;
-}
-#endif
-
#pragma mark TKApplication(TKDialog)
@@ -555,6 +538,7 @@ Tk_GetOpenFileObjCmd(
if (len) {
filename = [[[NSString alloc] initWithUTF8String:str]
autorelease];
+ [openpanel setNameFieldStringValue:filename];
}
break;
case OPEN_MESSAGE:
@@ -588,14 +572,12 @@ Tk_GetOpenFileObjCmd(
}
}
+ /* From OSX 10.11, the title string is silently ignored.
+ * Prepend the title to the message
+ * NOTE should be conditional on OSX version, but
+ * -mmacosx-version-min does not revert this behaviour*/
if (title) {
[openpanel setTitle:title];
-
- /* From OSX 10.11, the title string is silently ignored in the open panel.
- * Prepend the title to the message in this case
- * NOTE should be conditional on OSX version, but
- * -mmacosx-version-min does not revert this behaviour*/
-
if (message) {
NSString *fullmessage = [[NSString alloc] initWithFormat:@"%@\n%@",title,message];
[message release];
@@ -677,11 +659,10 @@ Tk_GetOpenFileObjCmd(
@selector(tkFilePanelDidEnd:returnCode:contextInfo:)
contextInfo:callbackInfo];
#else
- if (directory || filename ) {
- NSURL * fileURL = getFileURL(directory, filename);
- [openpanel setDirectoryURL:fileURL];
+ if (directory) {
+ [openpanel setDirectoryURL:[NSURL fileURLWithPath:directory isDirectory:YES]];
}
-
+ [openpanel setNameFieldStringValue:filename];
[openpanel beginSheetModalForWindow:parent
completionHandler:^(NSInteger returnCode)
{ [NSApp tkFilePanelDidEnd:openpanel
@@ -694,11 +675,10 @@ Tk_GetOpenFileObjCmd(
modalReturnCode = [openpanel runModalForDirectory:directory
file:filename];
#else
- if (directory || filename ) {
- NSURL * fileURL = getFileURL(directory, filename);
- [openpanel setDirectoryURL:fileURL];
+ if (directory) {
+ [openpanel setDirectoryURL:[NSURL fileURLWithPath:directory isDirectory:YES]];
}
-
+ [openpanel setNameFieldStringValue:filename];
modalReturnCode = [openpanel runModal];
#endif
[NSApp tkFilePanelDidEnd:openpanel returnCode:modalReturnCode
@@ -839,20 +819,13 @@ Tk_GetSaveFileObjCmd(
if (title) {
[savepanel setTitle:title];
-
- /* From OSX 10.11, the title string is silently ignored, if the save panel is a sheet.
- * Prepend the title to the message in this case
- * NOTE should be conditional on OSX version, but
- * -mmacosx-version-min does not revert this behaviour*/
- if (haveParentOption) {
- if (message) {
- NSString *fullmessage = [[NSString alloc] initWithFormat:@"%@\n%@",title,message];
- [message release];
- [title release];
- message = fullmessage;
- } else {
- message = title;
- }
+ if (message) {
+ NSString *fullmessage = [[NSString alloc] initWithFormat:@"%@\n%@",title,message];
+ [message release];
+ [title release];
+ message = fullmessage;
+ } else {
+ message = title;
}
}
@@ -925,12 +898,7 @@ Tk_GetSaveFileObjCmd(
if (directory) {
[savepanel setDirectoryURL:[NSURL fileURLWithPath:directory isDirectory:YES]];
}
- /*check for file name, otherwise set to empty string; crashes with uncaught exception if set to nil*/
- if (filename) {
- [savepanel setNameFieldStringValue:filename];
- } else {
- [savepanel setNameFieldStringValue:@""];
- }
+ [savepanel setNameFieldStringValue:filename];
[savepanel beginSheetModalForWindow:parent
completionHandler:^(NSInteger returnCode)
{ [NSApp tkFilePanelDidEnd:savepanel
@@ -945,12 +913,7 @@ Tk_GetSaveFileObjCmd(
if (directory) {
[savepanel setDirectoryURL:[NSURL fileURLWithPath:directory isDirectory:YES]];
}
- /*check for file name, otherwise set to empty string; crashes with uncaught exception if set to nil*/
- if (filename) {
- [savepanel setNameFieldStringValue:filename];
- } else {
- [savepanel setNameFieldStringValue:@""];
- }
+ [savepanel setNameFieldStringValue:filename];
modalReturnCode = [savepanel runModal];
#if 0
NSLog(@"modal: %li", modalReturnCode);
@@ -1084,10 +1047,6 @@ Tk_ChooseDirectoryObjCmd(
callbackInfo->cmdObj = cmdObj;
callbackInfo->interp = interp;
callbackInfo->multiple = 0;
- /*check for directory value, set to root if not specified; otherwise crashes with exception because of nil string parameter*/
- if (!directory) {
- directory = @"/";
- }
parent = TkMacOSXDrawableWindow(((TkWindow *) tkwin)->window);
if (haveParentOption && parent && ![parent attachedSheet]) {
parentIsKey = [parent isKeyWindow];
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index d1e67dc..5ca8bfe 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -858,16 +858,6 @@ 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/tests/corruptMangled.gif b/tests/corruptMangled.gif
deleted file mode 100644
index 9c1637c..0000000
--- a/tests/corruptMangled.gif
+++ /dev/null
Binary files differ
diff --git a/tests/corruptMangled4G.gif b/tests/corruptMangled4G.gif
deleted file mode 100644
index 7dfde0e..0000000
--- a/tests/corruptMangled4G.gif
+++ /dev/null
@@ -1,2 +0,0 @@
-GIF89aÂf3ÿÿ33ÿ3ÿ3ÿ33ÿÿÿÿ3ÿÿÿ!ù
-,!xºÜ-0Bw¤ïÚ¥µê×Jâ8Uæªkir/3Re7 ; \ No newline at end of file
diff --git a/tests/corruptTruncated.gif b/tests/corruptTruncated.gif
deleted file mode 100644
index 948305a..0000000
--- a/tests/corruptTruncated.gif
+++ /dev/null
Binary files differ
diff --git a/tests/font.test b/tests/font.test
index 62afa5a..23e09c4 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -1956,16 +1956,6 @@ test font-31.6 {Tk_IntersectTextLayout procedure: ignore spaces at eol} -body {
.t.c itemconfig text -width 0
return $x
} -result {}
-test font-31.7 {TkIntersectAngledTextLayout procedure: bug [514ff64dd0]} -body {
- csetup "This is line one\nand line two\nand line three here"
- .t.c itemconfigure text -angle 90
- # Coordinates of the rectangle to check can be hardcoded:
- # The goal of this test is to check whether the overlap detection algorithm
- # works when the rectangle is entirely included in a chunk of the text layout.
- # The text has been rotated 90 degrees around it's upper left corner,
- # so it's enough to check with a small rectangle with small negative y coords.
- .t.c find overlapping 5 -7 7 -5
-} -result {1}
destroy .t.c
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test
index 0126ad9..86da23d 100644
--- a/tests/imgPhoto.test
+++ b/tests/imgPhoto.test
@@ -59,13 +59,7 @@ set README [makeFile {
set teapotPhotoFile [file join [file dirname [info script]] teapot.ppm]
testConstraint hasTeapotPhoto [file exists $teapotPhotoFile]
-proc base64ok {} {
- expr {
- ![catch {package require base64}]
- }
-}
-
-testConstraint base64PackageNeeded [base64ok]
+# ----------------------------------------------------------------------
test imgPhoto-1.1 {options for photo images} -body {
image create photo photo1 -width 79 -height 83
@@ -820,18 +814,6 @@ test imgPhoto-4.75 {<photo> read command: filename starting with '-'} -constrain
image delete photo1
file delete ./-teapotPhotoFile
} -result {}
-test imgPhoto-4.76 {ImgPhotoCmd procedure: copy to same image} -constraints {
- hasTeapotPhoto
-} -setup {
- imageCleanup
- image create photo photo1 -file $teapotPhotoFile
-} -body {
- # non-regression test for bug [5239fd749b] - shall just not crash
- photo1 copy photo1 -to 0 0 2000 1000
- photo1 copy photo1 -subsample 2 2 -shrink
-} -cleanup {
- imageCleanup
-} -result {}
test imgPhoto-5.1 {ImgPhotoGet/Free procedures, shared instances} -constraints {
hasTeapotPhoto
@@ -1260,146 +1242,7 @@ test imgPhoto-17.3 {photo write: format guessing from filename} -setup {
catch {removeFile $f}
} -result "P6\n"
-# Reject corrupted or truncated image [Bug b601ce3ab1].
-# WARNING - tests 18.1-18.9 will cause a segfault on 8.5.19 and lower,
-# and on 8.6.6 and lower.
-test imgPhoto-18.1 {Reject corrupted GIF (binary string)} -constraints {
- base64PackageNeeded
-} -setup {
- package require base64
- set data [base64::decode {
- R0lGODlhAAQABP8zM/8z/zP/MzP/////M////yH5CiwheLrcLTBCd6Tv2qW16tdK4jhV
- 5qpraXIvM1JlNyAgOw==
- }]
-} -body {
- image create photo gif1 -data $data
-} -cleanup {
- catch {image delete gif1}
-} -returnCodes error -result {error reading color map|not enough free memory for image buffer} -match regexp
-test imgPhoto-18.2 {Reject corrupted GIF (base 64 string)} -setup {
- set data {
- R0lGODlhAAQABP8zM/8z/zP/MzP/////M////yH5CiwheLrcLTBCd6Tv2qW16tdK4jhV
- 5qpraXIvM1JlNyAgOw==
- }
-} -body {
- image create photo gif1 -data $data
-} -cleanup {
- catch {image delete gif1}
-} -returnCodes error -result {error reading color map|not enough free memory for image buffer} -match regexp
-test imgPhoto-18.3 {Reject corrupted GIF (file)} -setup {
- set fileName [file join [file dirname [info script]] corruptMangled.gif]
-} -body {
- image create photo gif1 -file $fileName
-} -cleanup {
- catch {image delete gif1}
-} -returnCodes error -result {error reading color map|not enough free memory for image buffer} -match regexp
-test imgPhoto-18.4 {Reject truncated GIF (binary string)} -constraints {
- base64PackageNeeded
-} -setup {
- package require base64
- set data [base64::decode {
- R0lGODlhEAAQAMIHAAAAADMz//8zM/8z/zP/MzP///8=
- }]
-} -body {
- image create photo gif1 -data $data
-} -cleanup {
- catch {image delete gif1}
-} -returnCodes error -result {error reading color map}
-test imgPhoto-18.5 {Reject truncated GIF (base 64 string)} -setup {
- set data {
- R0lGODlhEAAQAMIHAAAAADMz//8zM/8z/zP/MzP///8=
- }
-} -body {
- image create photo gif1 -data $data
-} -cleanup {
- catch {image delete gif1}
-} -returnCodes error -result {error reading color map}
-test imgPhoto-18.6 {Reject truncated GIF (file)} -setup {
- set fileName [file join [file dirname [info script]] corruptTruncated.gif]
-} -body {
- image create photo gif1 -file $fileName
-} -cleanup {
- catch {image delete gif1}
-} -returnCodes error -result {error reading color map}
-test imgPhoto-18.7 {Reject corrupted GIF (> 4Gb) (binary string)} -constraints {
- base64PackageNeeded nonPortable
-} -setup {
- # About the non portability constraint of this test: see ticket [cc42cc18a5]
- # If there is insufficient memory, the error message
- # {not enough free memory for image buffer} should be returned.
- # Instead, some systems (e.g. FreeBSD 11.1) terminate the test interpreter.
- package require base64
- set data [base64::decode {
- R0lGODlhwmYz//8zM/8z/zP/MzP/////M////yH5Ciwhe
- LrcLTBCd6Tv2qW16tdK4jhV5qpraXIvM1JlNyAgOw==
- }]
-} -body {
- image create photo gif1 -data $data
-} -cleanup {
- catch {image delete gif1}
-} -returnCodes error -result {error reading color map|not enough free memory for image buffer} -match regexp
-test imgPhoto-18.8 {Reject corrupted GIF (> 4Gb) (base 64 string)} -constraints {
- nonPortable
-} -setup {
- # About the non portability constraint of this test: see ticket [cc42cc18a5]
- # If there is insufficient memory, the error message
- # {not enough free memory for image buffer} should be returned.
- # Instead, some systems (e.g. FreeBSD 11.1) terminate the test interpreter.
- set data {
- R0lGODlhwmYz//8zM/8z/zP/MzP/////M////yH5Ciwhe
- LrcLTBCd6Tv2qW16tdK4jhV5qpraXIvM1JlNyAgOw==
- }
-} -body {
- image create photo gif1 -data $data
-} -cleanup {
- catch {image delete gif1}
-} -returnCodes error -result {error reading color map|not enough free memory for image buffer} -match regexp
-test imgPhoto-18.9 {Reject corrupted GIF (> 4Gb) (file)} -constraints {
- nonPortable
-} -setup {
- # About the non portability constraint of this test: see ticket [cc42cc18a5]
- # If there is insufficient memory, the error message
- # {not enough free memory for image buffer} should be returned.
- # Instead, some systems (e.g. FreeBSD 11.1) terminate the test interpreter.
- set fileName [file join [file dirname [info script]] corruptMangled4G.gif]
-} -body {
- image create photo gif1 -file $fileName
-} -cleanup {
- catch {image delete gif1}
-} -returnCodes error -result {error reading color map|not enough free memory for image buffer} -match regexp
-test imgPhoto-18.10 {Valid GIF (binary string)} -constraints {
- base64PackageNeeded
-} -setup {
- # Test the binary string reader with a valid GIF.
- # This is not tested elsewhere.
- # Tests 18.11, 18.12, with matching data, are included for completeness.
- package require base64
- set data [base64::decode {
- R0lGODlhEAAQAMIHAAAAADMz//8zM/8z/zP/MzP/////M////yH5BAEKAAcALAAA
- AAAQABAAAAMheLrcLTBCd6QV79qlterXB0riOFXmmapraXIvM1IdZTcJADs=
- }]
-} -body {
- image create photo gif1 -data $data
-} -cleanup {
- catch {image delete gif1}
-} -result gif1
-test imgPhoto-18.11 {Valid GIF (base 64 string)} -setup {
- set data {
- R0lGODlhEAAQAMIHAAAAADMz//8zM/8z/zP/MzP/////M////yH5BAEKAAcALAAA
- AAAQABAAAAMheLrcLTBCd6QV79qlterXB0riOFXmmapraXIvM1IdZTcJADs=
- }
-} -body {
- image create photo gif1 -data $data
-} -cleanup {
- catch {image delete gif1}
-} -result gif1
-test imgPhoto-18.12 {Valid GIF (file)} -setup {
- set fileName [file join [file dirname [info script]] red.gif]
-} -body {
- image create photo gif1 -file $fileName
-} -cleanup {
- catch {image delete gif1}
-} -result gif1
+# ----------------------------------------------------------------------
catch {rename foreachPixel {}}
catch {rename checkImgTrans {}}
diff --git a/tests/red.gif b/tests/red.gif
deleted file mode 100644
index 1d12ebb..0000000
--- a/tests/red.gif
+++ /dev/null
Binary files differ
diff --git a/tests/text.test b/tests/text.test
index 42b6114..edd2a6e 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -1577,16 +1577,6 @@ test text-8.26 {TextWidgetCmd procedure, "replace" option crash} -setup {
} -cleanup {
destroy .tt
} -result {}
-test text-8.27 {TextWidgetCmd procedure, "replace" option crash} -setup {
- text .tt
-} -body {
- .tt insert 0.0 \na
- for {set i 0} {$i < 2} {incr i} {
- .tt replace 2.0 3.0 b
- }
-} -cleanup {
- destroy .tt
-} -result {}
test text-9.1 {TextWidgetCmd procedure, "get" option} -setup {
diff --git a/unix/configure b/unix/configure
index a8cb060..d29cf7f 100755
--- a/unix/configure
+++ b/unix/configure
@@ -1338,7 +1338,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
TK_VERSION=8.6
TK_MAJOR_VERSION=8
TK_MINOR_VERSION=6
-TK_PATCH_LEVEL=".7"
+TK_PATCH_LEVEL=".6"
VERSION=${TK_VERSION}
LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv"
diff --git a/unix/configure.in b/unix/configure.in
index b0fb2e9..a4ffee3 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -25,7 +25,7 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [
TK_VERSION=8.6
TK_MAJOR_VERSION=8
TK_MINOR_VERSION=6
-TK_PATCH_LEVEL=".7"
+TK_PATCH_LEVEL=".6"
VERSION=${TK_VERSION}
LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv"
diff --git a/unix/tk.spec b/unix/tk.spec
index 82a45aa..ceb7256 100644
--- a/unix/tk.spec
+++ b/unix/tk.spec
@@ -4,7 +4,7 @@
Name: tk
Summary: Tk graphical toolkit for the Tcl scripting language.
-Version: 8.6.7
+Version: 8.6.6
Release: 2
License: BSD
Group: Development/Languages
diff --git a/unix/tkUnixSelect.c b/unix/tkUnixSelect.c
index dacbd99..4bb462e 100644
--- a/unix/tkUnixSelect.c
+++ b/unix/tkUnixSelect.c
@@ -166,13 +166,6 @@ TkSelGetSelection(
pendingRetrievals = &retr;
/*
- * Delete the property to indicate that no parameters are supplied for
- * the conversion request.
- */
-
- XDeleteProperty(winPtr->display, retr.winPtr->window, retr.property);
-
- /*
* Initiate the request for the selection. Note: can't use TkCurrentTime
* for the time. If we do, and this application hasn't received any X
* events in a long time, the current time will be way in the past and
diff --git a/win/configure b/win/configure
index ff1a0c9..3007a06 100755
--- a/win/configure
+++ b/win/configure
@@ -1312,7 +1312,7 @@ SHELL=/bin/sh
TK_VERSION=8.6
TK_MAJOR_VERSION=8
TK_MINOR_VERSION=6
-TK_PATCH_LEVEL=".7"
+TK_PATCH_LEVEL=".6"
VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION
#------------------------------------------------------------------------
diff --git a/win/configure.in b/win/configure.in
index 0caac64..00ec58e 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -14,7 +14,7 @@ SHELL=/bin/sh
TK_VERSION=8.6
TK_MAJOR_VERSION=8
TK_MINOR_VERSION=6
-TK_PATCH_LEVEL=".7"
+TK_PATCH_LEVEL=".6"
VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION
#------------------------------------------------------------------------
diff --git a/win/makefile.vc b/win/makefile.vc
index 206b487..6f61327 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -505,6 +505,14 @@ lflags = $(lflags) -profile
lflags = $(lflags) -nodefaultlib:libucrt.lib
!endif
+!if $(ALIGN98_HACK) && !$(STATIC_BUILD)
+### Align sections for PE size savings.
+lflags = $(lflags) -opt:nowin98
+!else if !$(ALIGN98_HACK) && $(STATIC_BUILD)
+### Align sections for speed in loading by choosing the virtual page size.
+lflags = $(lflags) -align:4096
+!endif
+
!if $(LOIMPACT)
lflags = $(lflags) -ws:aggressive
!endif
@@ -635,7 +643,7 @@ $(TKLIB): $(TKOBJS)
$**
<<
!else
- $(link32) $(dlllflags) -out:$@ $(guilibs) \
+ $(link32) $(dlllflags) -base:@$(COFFBASE),tk -out:$@ $(guilibs) \
$(TCLSTUBLIB) @<<
$**
<<
diff --git a/win/rules.vc b/win/rules.vc
index 36f5b9a..2cd711b 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -33,6 +33,7 @@ _INSTALLDIR = $(INSTALLDIR:/=\)
# "delete all" method.
#----------------------------------------------------------
+!if "$(OS)" == "Windows_NT"
RMDIR = rmdir /S /Q
ERRNULL = 2>NUL
!if ![ver | find "4.0" > nul]
@@ -42,6 +43,13 @@ COPY = copy >NUL
CPY = xcopy /i /y >NUL
COPY = copy /y >NUL
!endif
+!else # "$(OS)" != "Windows_NT"
+CPY = xcopy /i >_JUNK.OUT # On Win98 NUL does not work here.
+COPY = copy >_JUNK.OUT # On Win98 NUL does not work here.
+RMDIR = deltree /Y
+NULL = \NUL # Used in testing directory existence
+ERRNULL = >NUL # Win9x shell cannot redirect stderr
+!endif
MKDIR = mkdir
#------------------------------------------------------------------------------
@@ -180,6 +188,19 @@ COMPILERFLAGS = $(COMPILERFLAGS) -QIA64_Bx
!endif
!endif
+!if "$(MACHINE)" == "IX86"
+### test for -align:4096, when align:512 will do.
+!if [nmakehlp -l -opt:nowin98]
+!message *** Linker has 'Win98 alignment problem'
+ALIGN98_HACK = 1
+!else
+!message *** Linker does not have 'Win98 alignment problem'
+ALIGN98_HACK = 0
+!endif
+!else
+ALIGN98_HACK = 0
+!endif
+
LINKERFLAGS =
!if [nmakehlp -l -ltcg]
@@ -574,6 +595,7 @@ TCLIMPLIB = "$(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX:x=).lib"
TCL_LIBRARY = $(_TCLDIR)\lib
TCLREGLIB = "$(_TCLDIR)\lib\tclreg13$(SUFX:t=).lib"
TCLDDELIB = "$(_TCLDIR)\lib\tcldde14$(SUFX:t=).lib"
+COFFBASE = \must\have\tcl\sources\to\build\this\target
TCLTOOLSDIR = \must\have\tcl\sources\to\build\this\target
TCL_INCLUDES = -I"$(_TCLDIR)\include"
!else
@@ -589,6 +611,7 @@ TCLIMPLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX:x=).lib"
TCL_LIBRARY = $(_TCLDIR)\library
TCLREGLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg13$(SUFX:t=).lib"
TCLDDELIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde14$(SUFX:t=).lib"
+COFFBASE = "$(_TCLDIR)\win\coffbase.txt"
TCLTOOLSDIR = $(_TCLDIR)\tools
TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win"
!endif
diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c
index e13a5e5..1d17cc6 100644
--- a/win/tkWinDraw.c
+++ b/win/tkWinDraw.c
@@ -741,52 +741,6 @@ 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,
@@ -879,7 +833,7 @@ RenderObject(
SetPolyFillMode(dcMem, (gc->fill_rule == EvenOddRule) ? ALTERNATE
: WINDING);
oldMemBrush = SelectObject(dcMem, CreateSolidBrush(gc->foreground));
- MakeAndStrokePath(dcMem, winPoints, npoints, func);
+ func(dcMem, winPoints, npoints);
BitBlt(dc, rect.left, rect.top, width, height, dcMem, 0, 0, COPYFG);
/*
@@ -891,7 +845,7 @@ RenderObject(
if (gc->fill_style == FillOpaqueStippled) {
DeleteObject(SelectObject(dcMem,
CreateSolidBrush(gc->background)));
- MakeAndStrokePath(dcMem, winPoints, npoints, func);
+ func(dcMem, winPoints, npoints);
BitBlt(dc, rect.left, rect.top, width, height, dcMem, 0, 0,
COPYBG);
}
@@ -907,7 +861,7 @@ RenderObject(
SetPolyFillMode(dc, (gc->fill_rule == EvenOddRule) ? ALTERNATE
: WINDING);
- MakeAndStrokePath(dc, winPoints, npoints, func);
+ func(dc, winPoints, npoints);
SelectObject(dc, oldPen);
}
DeleteObject(SelectObject(dc, oldBrush));
diff --git a/win/ttkWinMonitor.c b/win/ttkWinMonitor.c
index 6e46374..c6e906b 100644
--- a/win/ttkWinMonitor.c
+++ b/win/ttkWinMonitor.c
@@ -122,15 +122,12 @@ WndProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
case WM_THEMECHANGED:
/*
- * Reset the application theme.
- * On windows, it is possible to sign in as a second user, change
- * the theme to 'winnative' (by setting the ui to 'best performance'),
- * which is a machine-wide change, and then sign back on to the original user.
- * Ttk_UseTheme needs to be executed again in order to process the fallback
- * from vista/xpnative to winnative.
+ * Reset the application theme to 'xpnative' if present,
+ * which will in turn fall back to 'winnative' if XP theming
+ * is disabled.
*/
- theme = Ttk_GetCurrentTheme(interp);
+ theme = Ttk_GetTheme(interp, "xpnative");
if (theme) {
Ttk_UseTheme(interp, theme);
/* @@@ What to do about errors here? */