summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWm.c
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2008-11-15 00:00:27 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2008-11-15 00:00:27 (GMT)
commit4c0836f8ae0a1a68edf876a7bcce826b8518d658 (patch)
tree0cd171a59f6750b740f05dea59cfa718220543b3 /macosx/tkMacOSXWm.c
parent080a0c2bef5e33ed37734a26d0647ea309cc3ea2 (diff)
downloadtk-4c0836f8ae0a1a68edf876a7bcce826b8518d658.zip
tk-4c0836f8ae0a1a68edf876a7bcce826b8518d658.tar.gz
tk-4c0836f8ae0a1a68edf876a7bcce826b8518d658.tar.bz2
bug 2239034: restrict [wm manage] to Frame type widgets
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r--macosx/tkMacOSXWm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 5e4c9b3..9374f43 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXWm.c,v 1.70 2008/10/17 23:18:38 nijtmans Exp $
+ * RCS: @(#) $Id: tkMacOSXWm.c,v 1.71 2008/11/15 00:00:27 patthoyts Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -2174,6 +2174,12 @@ WmManageCmd(
if (!Tk_IsTopLevel(frameWin)) {
MacDrawable *macWin = (MacDrawable *) winPtr->window;
+ 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);
if (wmPtr == NULL) {