summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2004-09-17 22:45:05 (GMT)
committerhobbs <hobbs@noemail.net>2004-09-17 22:45:05 (GMT)
commit4f52ad678d938d5505839894612cb43434556e04 (patch)
tree227fb5ee565b2a6880aa2f0bccbd3bd3b2da834b /tests
parentf480e912cbbe69ee7c5375b4a3012fd65e62c8bc (diff)
downloadtk-4f52ad678d938d5505839894612cb43434556e04.zip
tk-4f52ad678d938d5505839894612cb43434556e04.tar.gz
tk-4f52ad678d938d5505839894612cb43434556e04.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. * win/tkWinWm.c (WmIconwindowCmd): Replace bogus call to XWithdrawWindow with proper code. (mdejong) FossilOrigin-Name: e10081e3cf3f61195bf7fe54fa4b2118543dda2a
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 7bf9810..a9c014f 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.9 2002/07/25 21:35:23 pspjuth Exp $
+# RCS: @(#) $Id: winWm.test,v 1.9.2.1 2004/09/17 22:45:07 hobbs Exp $
package require tcltest 2.1
namespace import -force tcltest::configure
@@ -245,9 +245,7 @@ test winWm-6.3 {wm attributes} {pcOnly} {
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} {pcOnly} {
destroy .t
toplevel .t
@@ -258,7 +256,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} {pcOnly} {
destroy .t
toplevel .t
@@ -270,6 +268,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
::tcltest::cleanupTests