summaryrefslogtreecommitdiffstats
path: root/tests/unixWm.test
diff options
context:
space:
mode:
authormdejong <mdejong>2002-06-12 19:02:47 (GMT)
committermdejong <mdejong>2002-06-12 19:02:47 (GMT)
commitd0a1bb90be7ff13f1f6e4726a619d023aed98e71 (patch)
treeb9d5c6efdc426faf7948a35e387669270af7514d /tests/unixWm.test
parent72d83b662b05709150ca4d85040a0d35313a669d (diff)
downloadtk-d0a1bb90be7ff13f1f6e4726a619d023aed98e71.zip
tk-d0a1bb90be7ff13f1f6e4726a619d023aed98e71.tar.gz
tk-d0a1bb90be7ff13f1f6e4726a619d023aed98e71.tar.bz2
* changes: Add note about new transient behavior.
* tests/unixWm.test: Check that the WM_TRANSIENT_FOR property for a transient window is being cleared when the master is destroyed. * tests/wm.test: Source defs.tcl instead of using tcltest to match the rest of Tk's test files. Add new tests that ensure that a transient's state mirrors the state of the master. * unix/tkUnixWm.c (WmInfo, TkWmNewWindow, TkWmMapWindow, TkWmDeadWindow, Tk_WmCmd, WmWaitMapProc): Add numTransients member to WmInfo structure. Keep state of master and transient in sync using a callback that tracks MapNotify and UnmapNotify events. When the master is mapped, map the transient. When the master is unmapped or iconified, withdraw the transient. * win/tkWinWm.c (TkWmMapWindow, TkpWmSetState, TkWmDeadWindow, Tk_WmCmd, WmWaitVisibilityOrMapProc): Keep state of master and transient in sync using a callback that tracks MapNotify and UnmapNotify events. Move masterPtr check from TkpWmSetState into TkWmMapWindow to deal with WM_NEVER_MAPPED transients. Cleanup numTransients and the callback in TkWmDeadWindow. Cleanup numTransients and the callback only after deleting a master in wm transient command to avoid deleting the callback when an error is raised. Add support for MapNotify and UnmapNotify events to the master callback.
Diffstat (limited to 'tests/unixWm.test')
-rw-r--r--tests/unixWm.test15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/unixWm.test b/tests/unixWm.test
index ae675a4..f22ab67 100644
--- a/tests/unixWm.test
+++ b/tests/unixWm.test
@@ -7,7 +7,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: unixWm.test,v 1.15 2002/05/24 09:50:11 mdejong Exp $
+# RCS: @(#) $Id: unixWm.test,v 1.16 2002/06/12 19:02:49 mdejong Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -1279,7 +1279,18 @@ test unixWm-37.3 {Tk_WmCmd procedure, "transient" option} {unixOnly} {
destroy .t2
set result
} {{} {} .t 0 {} 0x0}
-test unixWm-37.4 {Tk_WmCmd procedure, "transient" option, create master wrapper} {unixOnly} {
+test unixWm-37.4 {TkWmDeadWindow, destroy on master should clear transient} {unixOnly} {
+ catch {destroy .t2}
+ toplevel .t2
+ catch {destroy .t3}
+ toplevel .t3
+ wm transient .t2 .t3
+ update
+ destroy .t3
+ update
+ list [wm transient .t2] [testprop [testwrapper .t2] WM_TRANSIENT_FOR]
+} {{} 0x0}
+test unixWm-37.5 {Tk_WmCmd procedure, "transient" option, create master wrapper} {unixOnly} {
catch {destroy .t2}
catch {destroy .t3}
toplevel .t2 -width 120 -height 300