summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorpatthoyts@users.sourceforge.net <patthoyts>2008-11-15 00:00:27 (GMT)
committerpatthoyts@users.sourceforge.net <patthoyts>2008-11-15 00:00:27 (GMT)
commit9637701db4c493a9ea2b3cb49b7e09c0d15933ae (patch)
tree0cd171a59f6750b740f05dea59cfa718220543b3 /unix
parent4bcd8d98061e9c14fd768787971dca2378523b5c (diff)
downloadtk-9637701db4c493a9ea2b3cb49b7e09c0d15933ae.zip
tk-9637701db4c493a9ea2b3cb49b7e09c0d15933ae.tar.gz
tk-9637701db4c493a9ea2b3cb49b7e09c0d15933ae.tar.bz2
bug 2239034: restrict [wm manage] to Frame type widgets
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixWm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index 358ba0f..2218d86 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.64 2008/11/08 18:44:40 dkf Exp $
+ * RCS: @(#) $Id: tkUnixWm.c,v 1.65 2008/11/15 00:00:27 patthoyts Exp $
*/
#include "tkUnixInt.h"
@@ -2660,6 +2660,12 @@ WmManageCmd(
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;