summaryrefslogtreecommitdiffstats
path: root/win/tkWinWm.c
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2008-11-15 00:37:30 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2008-11-15 00:37:30 (GMT)
commit90505d02bf23edf6c1d1083d2bb747c44f28089e (patch)
tree94a457439db11c45ad6ecdfc37d41d37f6d56919 /win/tkWinWm.c
parent64f28a15942c6c9b52d5a317c761edf3af0766a2 (diff)
downloadtk-90505d02bf23edf6c1d1083d2bb747c44f28089e.zip
tk-90505d02bf23edf6c1d1083d2bb747c44f28089e.tar.gz
tk-90505d02bf23edf6c1d1083d2bb747c44f28089e.tar.bz2
[Bug 2239034] Only frame widgets are acceptable for [wm manage]
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r--win/tkWinWm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 4f891ee..007b35c 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.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: tkWinWm.c,v 1.124.2.1 2008/08/01 20:24:50 patthoyts Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.124.2.2 2008/11/15 00:37:30 patthoyts Exp $
*/
#include "tkWinInt.h"
@@ -4602,6 +4602,12 @@ WmManageCmd(tkwin, winPtr, interp, objc, objv)
register WmInfo *wmPtr = winPtr->wmInfoPtr;
if (!Tk_IsTopLevel(frameWin)) {
+ if (!Tk_IsManageable(frameWin)) {
+ Tcl_AppendResult(interp, "window \"",
+ Tk_PathName(frameWin), "\" is not manageable: must be "
+ "a frame, labelframe or toplevel", NULL);
+ return TCL_ERROR;
+ }
TkFocusSplit(winPtr);
Tk_UnmapWindow(frameWin);
winPtr->flags |= TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED;