summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog20
-rw-r--r--generic/tkCanvas.c14
-rw-r--r--library/tkfbox.tcl10
-rw-r--r--tests/canvas.test9
-rw-r--r--tests/unixWm.test28
5 files changed, 61 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a168e6..3d6a198 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2000-03-28 Eric Melski <ericm@scriptics.com>
+
+ * library/tkfbox.tcl: Moved an overlooked tkFDialog* function in
+ ::tk::dialog::file namespace.
+
+ * tests/unixWm.test: Added tests for memory leak conditions in
+ tkUnixWm.c.
+
+ * tests/canvas.test: Added test for bad configuration options on
+ empty and non-empty canvas.
+
+ * generic/tkCanvas.c: Removed bad code in CANV_CONFIGURE block of
+ CanvasWidgetCmd; this was causing non-empty canvases to improperly
+ handle bad configuration options [Bug: 4456].
+
+2000-03-27 Eric Melski <ericm@scriptics.com>
+
+ * unix/tkUnixWm.c: Applied patch from [Bug: 4405]; fixes memory
+ leak in Unix wm command.
+
2000-03-24 Eric Melski <ericm@scriptics.com>
* tests/filebox.test:
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 268b182..176e44a 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvas.c,v 1.11 2000/01/12 11:45:02 hobbs Exp $
+ * RCS: @(#) $Id: tkCanvas.c,v 1.12 2000/03/29 00:09:06 ericm Exp $
*/
/* #define USE_OLD_TAG_SEARCH 1 */
@@ -876,18 +876,6 @@ CanvasWidgetCmd(clientData, interp, argc, argv)
} else {
result = ConfigureCanvas(interp, canvasPtr, argc-2, argv+2,
TK_CONFIG_ARGV_ONLY);
- for (itemPtr = canvasPtr->firstItemPtr;
- itemPtr != NULL; itemPtr = itemPtr->nextPtr) {
- if (itemPtr->state != TK_STATE_NULL) {
- continue;
- }
- EventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);
- result = (*itemPtr->typePtr->configProc)(interp,
- (Tk_Canvas) canvasPtr, itemPtr, 0, (Tcl_Obj **) NULL,
- TK_CONFIG_ARGV_ONLY);
- EventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);
- canvasPtr->flags |= REPICK_NEEDED;
- }
}
break;
}
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index 0495192..6090288 100644
--- a/library/tkfbox.tcl
+++ b/library/tkfbox.tcl
@@ -11,7 +11,7 @@
# files by clicking on the file icons or by entering a filename
# in the "Filename:" entry.
#
-# RCS: @(#) $Id: tkfbox.tcl,v 1.16 2000/03/24 19:38:57 ericm Exp $
+# RCS: @(#) $Id: tkfbox.tcl,v 1.17 2000/03/29 00:09:06 ericm Exp $
#
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
#
@@ -623,7 +623,7 @@ proc tkIconList_Reset {w} {
namespace eval ::tk::dialog {}
namespace eval ::tk::dialog::file {}
-# tkFDialog --
+# ::tk::dialog::file::tkFDialog --
#
# Implements the TK file selection dialog. This dialog is used when
# the tk_strictMotif flag is set to false. This procedure shouldn't
@@ -1155,7 +1155,7 @@ proc ::tk::dialog::file::SetFilter {w type} {
::tk::dialog::file::UpdateWhenIdle $w
}
-# tkFDialogResolveFile --
+# tk::dialog::file::ResolveFile --
#
# Interpret the user's text input in a file selection dialog.
# Performs:
@@ -1187,7 +1187,7 @@ proc ::tk::dialog::file::SetFilter {w type} {
# directory may not be the same as context, because text may contain
# a subdirectory name
#
-proc tkFDialogResolveFile {context text defaultext} {
+proc ::tk::dialog::file::ResolveFile {context text defaultext} {
set appPWD [pwd]
@@ -1292,7 +1292,7 @@ proc ::tk::dialog::file::ActivateEnt {w} {
upvar ::tk::dialog::file::[winfo name $w] data
set text [string trim [$data(ent) get]]
- set list [tkFDialogResolveFile $data(selectPath) $text \
+ set list [::tk::dialog::file::ResolveFile $data(selectPath) $text \
$data(-defaultextension)]
set flag [lindex $list 0]
set path [lindex $list 1]
diff --git a/tests/canvas.test b/tests/canvas.test
index f02d404..86da456 100644
--- a/tests/canvas.test
+++ b/tests/canvas.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: canvas.test,v 1.7 2000/03/02 21:52:25 hobbs Exp $
+# RCS: @(#) $Id: canvas.test,v 1.8 2000/03/29 00:09:06 ericm Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -67,6 +67,13 @@ foreach test {
incr i
}
+test canvas-1.40 {configure throws error on bad option} {
+ set res [list [catch {.c configure -gorp foo}]]
+ .c create rect 10 10 100 100
+ lappend res [catch {.c configure -gorp foo}]
+ set res
+} [list 1 1]
+
catch {destroy .c}
canvas .c -width 60 -height 40 -scrollregion {0 0 200 150} -bd 0 \
diff --git a/tests/unixWm.test b/tests/unixWm.test
index b9af65a..61c8a5a 100644
--- a/tests/unixWm.test
+++ b/tests/unixWm.test
@@ -7,7 +7,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: unixWm.test,v 1.11 2000/01/12 11:45:36 hobbs Exp $
+# RCS: @(#) $Id: unixWm.test,v 1.12 2000/03/29 00:09:07 ericm Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -353,6 +353,31 @@ test unixWm-8.9 {icon windows} {nonPortable} {
lappend result [winfo ismapped .icon] [wm state .icon]
} {icon 1 0 0 withdrawn 1 normal}
+test unixWm-59.1 {test for memory leaks} {
+ wm title .t "This is a long long long long long long title"
+ wm title .t "This is a long long long long long long title"
+ wm title .t "This is a long long long long long long title"
+ wm title .t "This is a long long long long long long title"
+ wm title .t "This is a long long long long long long title"
+ wm title .t "This is a long long long long long long title"
+ wm title .t "This is a long long long long long long title"
+ wm title .t "This is a long long long long long long title"
+ set x 1
+} 1
+test unixWm-59.2 {test for memory leaks} {
+ wm group .t .
+ wm group .t .
+ wm group .t .
+ wm group .t .
+ wm group .t .
+ wm group .t .
+ wm group .t .
+ wm group .t .
+ wm group .t .
+ wm group .t .
+ set x 1
+} 1
+
if {[string compare testwrapper [info commands testwrapper]] != 0} {
puts "This application hasn't been compiled with the testwrapper command,"
puts "therefore I am skipping all of these tests."
@@ -2413,6 +2438,7 @@ test unixWm-58.3 {exit processing} {
list $error $msg
} {0 {}}
+
# cleanup
catch {destroy .t}
catch {removeFile script}