summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tk.h7
-rw-r--r--generic/tkFrame.c8
2 files changed, 13 insertions, 2 deletions
diff --git a/generic/tk.h b/generic/tk.h
index 058e64b..37f3a35 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -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: tk.h,v 1.109.2.8 2008/10/23 16:30:57 dgp Exp $
+ * RCS: @(#) $Id: tk.h,v 1.109.2.9 2008/11/15 00:37:30 patthoyts Exp $
*/
#ifndef _TK
@@ -722,6 +722,8 @@ typedef XActivateDeactivateEvent XDeactivateEvent;
(((Tk_FakeWin *) (tkwin))->flags & TK_WIN_MANAGED)
#define Tk_TopWinHierarchy(tkwin) \
(((Tk_FakeWin *) (tkwin))->flags & TK_TOP_HIERARCHY)
+#define Tk_IsManageable(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->flags & TK_WM_MANAGEABLE)
#define Tk_ReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->reqWidth)
#define Tk_ReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->reqHeight)
/* Tk_InternalBorderWidth is deprecated */
@@ -857,6 +859,8 @@ typedef struct Tk_FakeWin {
* TK_PROP_PROPCHANGE 1 means that PropertyNotify events in the
* window's children should propagate up to this
* window.
+ * TK_WM_MANAGEABLE 1 marks a window as capable of being converted
+ * into a toplevel using [wm manage].
*/
#define TK_MAPPED 1
@@ -878,6 +882,7 @@ typedef struct Tk_FakeWin {
#define TK_WIN_MANAGED 0x10000
#define TK_TOP_HIERARCHY 0x20000
#define TK_PROP_PROPCHANGE 0x40000
+#define TK_WM_MANAGEABLE 0x80000
/*
*--------------------------------------------------------------
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index 372cbda..ddf0b5a 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkFrame.c,v 1.31 2007/12/13 15:24:14 dgp Exp $
+ * RCS: @(#) $Id: tkFrame.c,v 1.31.2.1 2008/11/15 00:37:30 patthoyts Exp $
*/
#include "default.h"
@@ -555,6 +555,12 @@ CreateFrame(
}
if (newWin == NULL) {
goto error;
+ } else {
+ /*
+ * Mark Tk frames as suitable candidates for [wm manage]
+ */
+ TkWindow *winPtr = (TkWindow *)newWin;
+ winPtr->flags |= TK_WM_MANAGEABLE;
}
if (className == NULL) {
className = Tk_GetOption(newWin, "class", "Class");