summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorchengyemao <chengyemao>2005-01-05 02:46:59 (GMT)
committerchengyemao <chengyemao>2005-01-05 02:46:59 (GMT)
commitadeccab09f9d93e8838d3471d347fbc90e8a2ffe (patch)
treea2af63acd25ba875baca34923be80215b4804a23 /win
parent3c44ba509f3b44f921b26608210e18158f6e82ad (diff)
downloadtk-adeccab09f9d93e8838d3471d347fbc90e8a2ffe.zip
tk-adeccab09f9d93e8838d3471d347fbc90e8a2ffe.tar.gz
tk-adeccab09f9d93e8838d3471d347fbc90e8a2ffe.tar.bz2
Made the remarks of TkpUseWindow clearer regarding the embedding/embedded attachment protocol
Diffstat (limited to 'win')
-rw-r--r--win/tkWinEmbed.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c
index 371d5c3..4c4fb69 100644
--- a/win/tkWinEmbed.c
+++ b/win/tkWinEmbed.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: tkWinEmbed.c,v 1.16 2004/12/28 08:45:31 chengyemao Exp $
+ * RCS: @(#) $Id: tkWinEmbed.c,v 1.17 2005/01/05 02:46:59 chengyemao Exp $
*/
#include "tkWinInt.h"
@@ -124,10 +124,14 @@ TkpTestembedCmd(clientData, interp, argc, argv)
*
* This procesure sends a TK_ATTACHWINDOW message to the window to
* use. The returned value is either 0 (the window to use is already
- * in use) or the hwnd of the window to use (the window to use is
- * ready to serve as a container) or other values (the window to use
- * needs to be confirmed since this protocol was not used before Tk85).
- *
+ * in use or unable to be used as a container) or the hwnd of the
+ * window to use (the window to use is ready to serve as a container)
+ * or other values (the window to use needs to be confirmed since
+ * this protocol was not used before Tk85). This protocol is required
+ * in order to verify if the window to use is a valid container.
+ * Without an id verification, an invalid window attachment may cause
+ * unexpected crashes/panics (see bug # 1096074).
+ *
* Results:
* The return value is normally TCL_OK. If an error occurred (such as
* if the argument does not identify a legal Windows window handle or
@@ -195,7 +199,7 @@ TkpUseWindow(interp, tkwin, string)
if(id == 0 || id != (long)hwnd) {
char msg[256];
if(id == 0) {
- sprintf(msg, "The window \"%s\" is either unable or already to be used as a container", string);
+ sprintf(msg, "The window \"%s\" is unable to be or has already been used as a container.", string);
Tcl_SetResult(interp, msg, TCL_VOLATILE);
return TCL_ERROR;
} else {