summaryrefslogtreecommitdiffstats
path: root/macosx
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)
commitaf6b3cd3e4c83b73e3c84cfd656bffd05523d141 (patch)
tree94a457439db11c45ad6ecdfc37d41d37f6d56919 /macosx
parentd28676b1bedf7d3ce6cd75eae391856fcc1a70d0 (diff)
downloadtk-af6b3cd3e4c83b73e3c84cfd656bffd05523d141.zip
tk-af6b3cd3e4c83b73e3c84cfd656bffd05523d141.tar.gz
tk-af6b3cd3e4c83b73e3c84cfd656bffd05523d141.tar.bz2
[Bug 2239034] Only frame widgets are acceptable for [wm manage]
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXWm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 2a7d1a8..88e49fe 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.63.2.1 2008/05/03 21:09:16 das Exp $
+ * RCS: @(#) $Id: tkMacOSXWm.c,v 1.63.2.2 2008/11/15 00:37:30 patthoyts Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -2134,6 +2134,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) {