diff options
author | patthoyts@users.sourceforge.net <patthoyts> | 2008-11-15 00:37:30 (GMT) |
---|---|---|
committer | patthoyts@users.sourceforge.net <patthoyts> | 2008-11-15 00:37:30 (GMT) |
commit | d39b78bac5cdef9af2bcb3f14b6ea23309df7500 (patch) | |
tree | 94a457439db11c45ad6ecdfc37d41d37f6d56919 /unix/tkUnixWm.c | |
parent | c5677938ded79b8fd2d5a02a717ef16b9ec7ef9b (diff) | |
download | tk-d39b78bac5cdef9af2bcb3f14b6ea23309df7500.zip tk-d39b78bac5cdef9af2bcb3f14b6ea23309df7500.tar.gz tk-d39b78bac5cdef9af2bcb3f14b6ea23309df7500.tar.bz2 |
[Bug 2239034] Only frame widgets are acceptable for [wm manage]
Diffstat (limited to 'unix/tkUnixWm.c')
-rw-r--r-- | unix/tkUnixWm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index d8082ff..ec90e5c 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.58 2007/12/13 15:28:51 dgp Exp $ + * RCS: @(#) $Id: tkUnixWm.c,v 1.58.2.1 2008/11/15 00:37:30 patthoyts Exp $ */ #include "tkUnixInt.h" @@ -2661,6 +2661,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; |