summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdejong <mdejong>2004-09-15 04:02:55 (GMT)
committermdejong <mdejong>2004-09-15 04:02:55 (GMT)
commitf614b7b595c28a0f7e7fe566ddbec9d898d839f5 (patch)
tree2445768b26d721917ce7a30446bfab2eb23633b2
parent5fd6d4b4dd95ccdc961074ad3a481669631db77a (diff)
downloadtk-f614b7b595c28a0f7e7fe566ddbec9d898d839f5.zip
tk-f614b7b595c28a0f7e7fe566ddbec9d898d839f5.tar.gz
tk-f614b7b595c28a0f7e7fe566ddbec9d898d839f5.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.
-rw-r--r--ChangeLog9
-rw-r--r--win/tkWinWm.c11
2 files changed, 12 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 5cb1dd7..7b8e13d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-09-14 Mo DeJong <mdejong@users.sourceforge.net>
+
+ * 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.
+
2004-09-13 Jeff Hobbs <jeffh@ActiveState.com>
* win/tkWinWm.c (ReadIconFromFile): fix mem alloc to get the right
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;