summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixWm.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index 7b68074..5eca42a 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.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: tkUnixWm.c,v 1.7 2000/02/10 08:53:19 hobbs Exp $
+ * RCS: @(#) $Id: tkUnixWm.c,v 1.8 2000/03/27 18:02:59 ericm Exp $
*/
#include "tkPort.h"
@@ -1228,6 +1228,9 @@ Tk_WmCmd(clientData, interp, argc, argv)
if (wmPtr2->wrapperPtr == NULL) {
CreateWrapper(wmPtr2);
}
+ if (wmPtr->leaderName != NULL) {
+ ckfree(wmPtr->leaderName);
+ }
wmPtr->hints.window_group = Tk_WindowId(wmPtr2->wrapperPtr);
wmPtr->hints.flags |= WindowGroupHint;
wmPtr->leaderName = ckalloc((unsigned) (strlen(argv[3])+1));
@@ -1354,6 +1357,9 @@ Tk_WmCmd(clientData, interp, argc, argv)
TCL_STATIC);
return TCL_OK;
} else {
+ if (wmPtr->iconName != NULL) {
+ ckfree((char *) wmPtr->iconName);
+ }
wmPtr->iconName = ckalloc((unsigned) (strlen(argv[3]) + 1));
strcpy(wmPtr->iconName, argv[3]);
if (!(wmPtr->flags & WM_NEVER_MAPPED)) {
@@ -1847,6 +1853,9 @@ Tk_WmCmd(clientData, interp, argc, argv)
TCL_STATIC);
return TCL_OK;
} else {
+ if (wmPtr->title != NULL) {
+ ckfree((char *) wmPtr->title);
+ }
wmPtr->title = ckalloc((unsigned) (strlen(argv[3]) + 1));
strcpy(wmPtr->title, argv[3]);
if (!(wmPtr->flags & WM_NEVER_MAPPED)) {
@@ -1903,6 +1912,9 @@ Tk_WmCmd(clientData, interp, argc, argv)
CreateWrapper(wmPtr2);
}
wmPtr->master = Tk_WindowId(wmPtr2->wrapperPtr);
+ if (wmPtr->masterWindowName != NULL) {
+ ckfree((char *) wmPtr->masterWindowName);
+ }
wmPtr->masterWindowName = ckalloc((unsigned) (strlen(argv[3])+1));
strcpy(wmPtr->masterWindowName, argv[3]);
}