summaryrefslogtreecommitdiffstats
path: root/tests/winWm.test
diff options
context:
space:
mode:
authormdejong <mdejong>2002-06-24 20:34:40 (GMT)
committermdejong <mdejong>2002-06-24 20:34:40 (GMT)
commitb2d10e52b29a853f6617b873da1152ac86f25d98 (patch)
treec3ddfdff422760f0f504dc54ece65afb4b22f916 /tests/winWm.test
parent5301e3774409c2ecde99877add0448e84c972c93 (diff)
downloadtk-b2d10e52b29a853f6617b873da1152ac86f25d98.zip
tk-b2d10e52b29a853f6617b873da1152ac86f25d98.tar.gz
tk-b2d10e52b29a853f6617b873da1152ac86f25d98.tar.bz2
* tests/winWm.test: Verify that both an unmapped
and already mapped toplevel are raised and receive the focus when deiconified. * tests/wm.test: Add wm deiconify tests. Check that a toplevel that has never been mapped is not mapped by the deiconify command since it should be done at idle by MapFrame. * win/tkWinWm.c (Tk_WmCmd): Check the WM_NEVER_MAPPED flag while processing the wm deiconify command. The WM_UPDATE_PENDING flag should never be set when WM_NEVER_MAPPED is set, but double check so that the implementation is more explicit and matches the comment just above. Return without invoking TkWmRestackToplevel or TkSetFocusWin on a toplevel that has never been mapped. This fixes a bug where a toplevel is mapped with the wrong size and is then resized by the idle call to MapFrame. [Tk bug 233150]
Diffstat (limited to 'tests/winWm.test')
-rw-r--r--tests/winWm.test26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/winWm.test b/tests/winWm.test
index 72f5919..bc4a220 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.5 2002/06/22 10:13:26 hobbs Exp $
+# RCS: @(#) $Id: winWm.test,v 1.6 2002/06/24 20:34:40 mdejong Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -248,6 +248,30 @@ test winWm-6.3 {wm attributes} {pcOnly} {
destroy .t
+test winWm-6.1 {deiconify on an unmapped toplevel
+ will raise the window and set the focus} {pcOnly} {
+ destroy .t
+ toplevel .t
+ lower .t
+ focus -force .
+ wm deiconify .t
+ update
+ list [wm stackorder .t isabove .] [focus]
+} {1 .t}
+
+test winWm-6.2 {deiconify on an already mapped toplevel
+ will raise the window and set the focus} {pcOnly} {
+ destroy .t
+ toplevel .t
+ lower .t
+ update
+ focus -force .
+ wm deiconify .t
+ update
+ list [wm stackorder .t isabove .] [focus]
+} {1 .t}
+
+
# cleanup
::tcltest::cleanupTests
return