summaryrefslogtreecommitdiffstats
path: root/tests/wm.test
diff options
context:
space:
mode:
authormdejong <mdejong@noemail.net>2002-05-27 22:54:42 (GMT)
committermdejong <mdejong@noemail.net>2002-05-27 22:54:42 (GMT)
commit476c58c661f2bfa0bc75b6f0aaf2f8a2c7032b77 (patch)
tree4df8b5fe8d050ea301707b1a94f1f4fd55265556 /tests/wm.test
parenta5359176acf34e02dcd4ea296fb8673aa0017324 (diff)
downloadtk-476c58c661f2bfa0bc75b6f0aaf2f8a2c7032b77.zip
tk-476c58c661f2bfa0bc75b6f0aaf2f8a2c7032b77.tar.gz
tk-476c58c661f2bfa0bc75b6f0aaf2f8a2c7032b77.tar.bz2
* changes: Document [wm transient .t .t] error.
* tests/wm.test: Check that setting a window as a transient of itself raises an error. Check that passing a non-toplevel window to the wm transient command uses the enclosing toplevel. * unix/tkUnixWm.c (Tk_WmCmd): Raise an error if the user tries to make a toplevel a transient of itself. * win/tkWinWm.c (Tk_WmCmd): Raise an error if the user tries to make a toplevel a transient of itself. Test for other error before checking for the transient self error. FossilOrigin-Name: c9b836ac06039b02353fba98ada7fb240b3fb2b4
Diffstat (limited to 'tests/wm.test')
-rw-r--r--tests/wm.test38
1 files changed, 37 insertions, 1 deletions
diff --git a/tests/wm.test b/tests/wm.test
index 025dd24..14cce6b 100644
--- a/tests/wm.test
+++ b/tests/wm.test
@@ -7,7 +7,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: wm.test,v 1.7 2002/05/27 19:49:33 mdejong Exp $
+# RCS: @(#) $Id: wm.test,v 1.8 2002/05/27 22:54:42 mdejong Exp $
# This file tests window manager interactions that work across
# platforms. Window manager tests that only work on a specific
@@ -345,6 +345,42 @@ test wm-transient-1.6 {usage} {
list [catch {wm transient .dummy .icon} msg] $msg
} {1 {can't make ".icon" a master: it is an icon for .top}}
+test wm-transient-1.7 {usage} {
+ deleteWindows
+ toplevel .master
+ list [catch {wm transient .master .master} err] $err
+} {1 {can't make ".master" its own master}}
+
+test wm-transient-1.8 {usage} {
+ deleteWindows
+ toplevel .master
+ frame .master.f
+ list [catch {wm transient .master .master.f} err] $err
+} {1 {can't make ".master" its own master}}
+
+test wm-transient-2.1 { basic get/set of master } {
+ deleteWindows
+ set results [list]
+ toplevel .master
+ toplevel .subject
+ lappend results [wm transient .subject]
+ wm transient .subject .master
+ lappend results [wm transient .subject]
+ wm transient .subject {}
+ lappend results [wm transient .subject]
+ set results
+} {{} .master {}}
+
+test wm-transient-2.2 { first toplevel parent of
+ non-toplevel master is used } {
+ deleteWindows
+ toplevel .master
+ frame .master.f
+ toplevel .subject
+ wm transient .subject .master.f
+ wm transient .subject
+} {.master}
+
test wm-state-1.1 {usage} {