summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixWm.c
diff options
context:
space:
mode:
authorjenglish@flightlab.com <jenglish>2003-10-15 20:04:02 (GMT)
committerjenglish@flightlab.com <jenglish>2003-10-15 20:04:02 (GMT)
commitc19936e1019da471b424eff1b2e00a1c0b2f57ec (patch)
tree1ca5c0c724c3e757b0136a7cd9d8db3ac431373c /unix/tkUnixWm.c
parent8c597419e367d53cef19f5287b473aaca01741a9 (diff)
downloadtk-c19936e1019da471b424eff1b2e00a1c0b2f57ec.zip
tk-c19936e1019da471b424eff1b2e00a1c0b2f57ec.tar.gz
tk-c19936e1019da471b424eff1b2e00a1c0b2f57ec.tar.bz2
Delete WM_TRANSIENT_FOR property instead of setting it to None
when making a window nontransient [Bug #632816 "cannot remove transient"]
Diffstat (limited to 'unix/tkUnixWm.c')
-rw-r--r--unix/tkUnixWm.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index 5721b02..0d535ea 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.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: tkUnixWm.c,v 1.37 2003/03/12 00:25:41 mdejong Exp $
+ * RCS: @(#) $Id: tkUnixWm.c,v 1.38 2003/10/15 20:04:03 jenglish Exp $
*/
#include "tkPort.h"
@@ -866,8 +866,8 @@ TkWmDeadWindow(winPtr)
WmWaitMapProc, (ClientData) wmPtr2->winPtr);
wmPtr2->masterPtr = NULL;
if (!(wmPtr2->flags & WM_NEVER_MAPPED)) {
- XSetTransientForHint(wmPtr2->winPtr->display,
- wmPtr2->wrapperPtr->window, None);
+ XDeleteProperty(winPtr->display, wmPtr2->wrapperPtr->window,
+ Tk_InternAtom((Tk_Window) winPtr, "WM_TRANSIENT_FOR"));
/* FIXME: Need a call like Win32's UpdateWrapper() so
we can recreate the wrapper and get rid of the
transient window decorations. */
@@ -3084,10 +3084,13 @@ WmTransientCmd(tkwin, winPtr, interp, objc, objv)
return TCL_ERROR;
}
} else {
- Window xwin = (wmPtr->masterPtr == NULL) ? None :
- wmPtr->masterPtr->wmInfoPtr->wrapperPtr->window;
- XSetTransientForHint(winPtr->display, wmPtr->wrapperPtr->window,
- xwin);
+ if (wmPtr->masterPtr != NULL) {
+ XSetTransientForHint(winPtr->display, wmPtr->wrapperPtr->window,
+ wmPtr->masterPtr->wmInfoPtr->wrapperPtr->window);
+ } else {
+ XDeleteProperty(winPtr->display, wmPtr->wrapperPtr->window,
+ Tk_InternAtom((Tk_Window)winPtr, "WM_TRANSIENT_FOR"));
+ }
}
}
return TCL_OK;