diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tk.h | 7 | ||||
-rw-r--r-- | generic/tkFrame.c | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/generic/tk.h b/generic/tk.h index 516205b..0144e61 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.124 2008/11/12 00:15:26 nijtmans Exp $ + * RCS: @(#) $Id: tk.h,v 1.125 2008/11/15 00:00:27 patthoyts Exp $ */ #ifndef _TK @@ -721,6 +721,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 */ @@ -856,6 +858,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 @@ -877,6 +881,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 472c8ca..4ff8866 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.36 2008/11/08 22:52:29 dkf Exp $ + * RCS: @(#) $Id: tkFrame.c,v 1.37 2008/11/15 00:00:27 patthoyts Exp $ */ #include "default.h" @@ -556,6 +556,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"); |