summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-09-17 22:44:33 (GMT)
committerhobbs <hobbs>2004-09-17 22:44:33 (GMT)
commit705a2cd41762dcd59142f046d702a0224ad2c9af (patch)
tree6e2bc6e00f5cd1d19fdc6a4f23cca1b8054828f8 /tests
parenteb82ebc6a7d603249f7eb738351333a4e2d91784 (diff)
downloadtk-705a2cd41762dcd59142f046d702a0224ad2c9af.zip
tk-705a2cd41762dcd59142f046d702a0224ad2c9af.tar.gz
tk-705a2cd41762dcd59142f046d702a0224ad2c9af.tar.bz2
* win/tkWinWm.c (UpdateWrapper): Ensure that we maintain Z order
* tests/winWm.test: and focus of preexisting window when replacing the wrapper window.
Diffstat (limited to 'tests')
-rw-r--r--tests/winWm.test31
1 files changed, 26 insertions, 5 deletions
diff --git a/tests/winWm.test b/tests/winWm.test
index 0140218..246aefa 100644
--- a/tests/winWm.test
+++ b/tests/winWm.test
@@ -9,7 +9,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: winWm.test,v 1.11 2004/06/24 12:45:44 dkf Exp $
+# RCS: @(#) $Id: winWm.test,v 1.12 2004/09/17 22:44:34 hobbs Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -242,9 +242,7 @@ test winWm-6.3 {wm attributes} win {
list [catch {wm attributes .t -foo} msg] $msg
} {1 {wrong # args: should be "wm attributes window ?-disabled ?bool?? ?-toolwindow ?bool?? ?-topmost ?bool??"}}
-destroy .t
-
-test winWm-6.1 {deiconify on an unmapped toplevel\
+test winWm-7.1 {deiconify on an unmapped toplevel\
will raise the window and set the focus} win {
destroy .t
toplevel .t
@@ -255,7 +253,7 @@ test winWm-6.1 {deiconify on an unmapped toplevel\
list [wm stackorder .t isabove .] [focus]
} {1 .t}
-test winWm-6.2 {deiconify on an already mapped toplevel\
+test winWm-7.2 {deiconify on an already mapped toplevel\
will raise the window and set the focus} win {
destroy .t
toplevel .t
@@ -267,6 +265,29 @@ test winWm-6.2 {deiconify on an already mapped toplevel\
list [wm stackorder .t isabove .] [focus]
} {1 .t}
+test winWm-7.3 {UpdateWrapper must maintain Z order} win {
+ destroy .t
+ toplevel .t
+ lower .t
+ update
+ set res [wm stackorder .t isbelow .]
+ wm resizable .t 0 0
+ update
+ list $res [wm stackorder .t isbelow .]
+} {1 1}
+
+test winWm-7.4 {UpdateWrapper must maintain focus} win {
+ destroy .t
+ toplevel .t
+ focus -force .t
+ update
+ set res [focus]
+ wm resizable .t 0 0
+ update
+ list $res [focus]
+} {.t .t}
+
+destroy .t
# cleanup
cleanupTests