summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authormdejong <mdejong>2004-09-15 04:02:55 (GMT)
committermdejong <mdejong>2004-09-15 04:02:55 (GMT)
commitc0b97fcbba31a29e91424f07a2d9ae0a1498d4e5 (patch)
tree2445768b26d721917ce7a30446bfab2eb23633b2 /win
parent14435b7c201c35ada74999296dae4a13b512806e (diff)
downloadtk-c0b97fcbba31a29e91424f07a2d9ae0a1498d4e5.zip
tk-c0b97fcbba31a29e91424f07a2d9ae0a1498d4e5.tar.gz
tk-c0b97fcbba31a29e91424f07a2d9ae0a1498d4e5.tar.bz2
* win/tkWinWm.c (WmIconwindowCmd): Replace bogus
call to XWithdrawWindow with proper code. This avoids a "couldn't send withdraw message to window manager" error when the iconwindow is already mapped. The wm iconwindow command does not seem to do much under Win32, but at least this avoids an error message.
Diffstat (limited to 'win')
-rw-r--r--win/tkWinWm.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index cb1e45d..2107cb7 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.68 2004/09/13 22:54:37 hobbs Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.69 2004/09/15 04:02:57 mdejong Exp $
*/
#include "tkWinInt.h"
@@ -3893,13 +3893,8 @@ WmIconwindowCmd(tkwin, winPtr, interp, objc, objv)
wmPtr->icon = tkwin2;
wmPtr2->iconFor = (Tk_Window) winPtr;
if (!(wmPtr2->flags & WM_NEVER_MAPPED)) {
- if (XWithdrawWindow(Tk_Display(tkwin2), Tk_WindowId(tkwin2),
- Tk_ScreenNumber(tkwin2)) == 0) {
- Tcl_SetResult(interp,
- "couldn't send withdraw message to window manager",
- TCL_STATIC);
- return TCL_ERROR;
- }
+ wmPtr2->flags |= WM_WITHDRAWN;
+ TkpWmSetState(((TkWindow *) tkwin2), WithdrawnState);
}
}
return TCL_OK;