From c0b97fcbba31a29e91424f07a2d9ae0a1498d4e5 Mon Sep 17 00:00:00 2001 From: mdejong Date: Wed, 15 Sep 2004 04:02:55 +0000 Subject: * 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. --- ChangeLog | 9 +++++++++ win/tkWinWm.c | 11 +++-------- 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 + + * 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 * 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; -- cgit v0.12