summaryrefslogtreecommitdiffstats
path: root/win/tkWinWm.c
diff options
context:
space:
mode:
authorchengyemao <chengyemao>2005-01-12 02:58:29 (GMT)
committerchengyemao <chengyemao>2005-01-12 02:58:29 (GMT)
commit4caa27530c1ea45527b8e4dc77242763908cc4f4 (patch)
treecbf0ec63197f03e7d5763ccf1de4c39a1dd8e535 /win/tkWinWm.c
parentd85af204a9d1f218bd5e67862a9b14031760dfb3 (diff)
downloadtk-4caa27530c1ea45527b8e4dc77242763908cc4f4.zip
tk-4caa27530c1ea45527b8e4dc77242763908cc4f4.tar.gz
tk-4caa27530c1ea45527b8e4dc77242763908cc4f4.tar.bz2
Minor bug fix to support embedding/embedded
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r--win/tkWinWm.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 1d2f3fc..4a2738b 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.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: tkWinWm.c,v 1.91 2005/01/10 15:32:28 chengyemao Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.92 2005/01/12 02:58:29 chengyemao Exp $
*/
#include "tkWinInt.h"
@@ -3800,6 +3800,13 @@ WmIconifyCmd(tkwin, winPtr, interp, objc, objv)
Tcl_WrongNumArgs(interp, 2, objv, "window");
return TCL_ERROR;
}
+ if (winPtr->flags & TK_EMBEDDED) {
+ if(!SendMessage(wmPtr->wrapper, TK_ICONIFY, 0, 0)) {
+ Tcl_AppendResult(interp, "can't iconify ", winPtr->pathName,
+ ": the container does not support the request", (char *) NULL);
+ return TCL_ERROR;
+ }
+ }
if (Tk_Attributes((Tk_Window) winPtr)->override_redirect) {
Tcl_AppendResult(interp, "can't iconify \"", winPtr->pathName,
"\": override-redirect flag is set", (char *) NULL);
@@ -3816,13 +3823,6 @@ WmIconifyCmd(tkwin, winPtr, interp, objc, objv)
(char *) NULL);
return TCL_ERROR;
}
- if (winPtr->flags & TK_EMBEDDED) {
- if(!SendMessage(wmPtr->wrapper, TK_ICONIFY, 0, 0)) {
- Tcl_AppendResult(interp, "can't iconify ", winPtr->pathName,
- ": the container does not support the request", (char *) NULL);
- return TCL_ERROR;
- }
- }
TkpWmSetState(winPtr, IconicState);
return TCL_OK;
}
@@ -7985,5 +7985,6 @@ void TkpWinToplevelDetachWindow(winPtr)
wmPtr->wrapper = None;
if(state >= 0 && state <= 3) wmPtr->hints.initial_state = state;
}
- TkpWinToplevelOverrideRedirect(winPtr, 1);
+ if(winPtr->flags & TK_TOP_LEVEL)
+ TkpWinToplevelOverrideRedirect(winPtr, 1);
}