summaryrefslogtreecommitdiffstats
path: root/tests/wm.test
diff options
context:
space:
mode:
authormdejong <mdejong>2002-05-27 22:54:42 (GMT)
committermdejong <mdejong>2002-05-27 22:54:42 (GMT)
commit972e97ee22e87ef707a976111cddbfe80b4737fc (patch)
tree4df8b5fe8d050ea301707b1a94f1f4fd55265556 /tests/wm.test
parent1c823cfbaafe492b3bd9a506d782804f797bcc2e (diff)
downloadtk-972e97ee22e87ef707a976111cddbfe80b4737fc.zip
tk-972e97ee22e87ef707a976111cddbfe80b4737fc.tar.gz
tk-972e97ee22e87ef707a976111cddbfe80b4737fc.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.
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} {