head	1.48;
access;
symbols
	core-8-5-9:1.44.2.2
	core-8-5-8:1.44
	macosx-cocoa-merge:1.46
	macosx-cocoa-premerge:1.46
	macosx-carbon-freeze:1.46
	core-8-5-7:1.44
	core-8-5-6:1.44
	core-8-6-b1:1.46
	core-8-6-a3:1.46
	core-8-5-5:1.44
	core-8-6-a2:1.45
	core-8-5-4:1.44
	core-8-5-3:1.44
	core-8-6-a1:1.44
	core-8-4-19:1.29.2.4
	core-8-5-branch:1.44.0.2
	core-8-5-2:1.44
	core-8-4-18:1.29.2.4
	core-8-5-1:1.44
	core-8-4-17:1.29.2.4
	core-8-5-0:1.44
	core-8-5-b3:1.43
	core-8-5-b2:1.42
	core-8-4-16:1.29.2.4
	core-8-5-b1:1.42
	core-stablilizer-merge:1.42
	core-stabilizer-branch:1.42.0.2
	core-stabilizer-merge:1.44
	core-8-4-15:1.29.2.4
	core-8-5-a6:1.41
	core-8-5-a5:1.41
	core-8-4-14:1.29.2.4
	core-8-5-a4:1.41
	core-8-4-13:1.29.2.4
	core-8-4-12:1.29.2.4
	core-8-4-11:1.29.2.4
	core-8-5-a3:1.40
	core-8-4-10:1.29.2.4
	core-8-4-9-branch:1.29.2.3.0.2
	core-8-5-a2:1.40
	core-8-4-9:1.29.2.3
	core-8-4-8:1.29.2.3
	core-8-4-7:1.29.2.2
	core-8-5-a1:1.36
	core-8-4-6:1.29.2.2
	core-8-4-5:1.29.2.2
	mistachkin-dev-branch:1.34.0.2
	core-8-4-4:1.29.2.2
	core-8-4-3:1.29.2.2
	core-8-4-branch:1.29.0.2
	core-8-4-2:1.29
	core-8-4-1:1.28
	core-8-3-5:1.12.2.2
	core-8-4-0:1.28
	macosx-8-4-merge-2002-08-31-trunk:1.27
	macosx-8-4-premerge-2002-08-31-branch:1.13.2.4
	macosx-8-4-premerge-2002-08-31-trunk:1.27
	macosx-8-4-merge-2002-08-30-branch:1.13.2.4
	macosx-8-4-merge-2002-08-30-trunk:1.27
	macosx-8-4-merge-2002-08-20-branch:1.13.2.4
	macosx-8-4-merge-2002-08-20-trunk:1.27
	core-8-4-b2:1.26
	core-8-4-b1:1.19
	macosx-premerge-6-9-02:1.13.2.2
	core-8-4-a4:1.14
	core-8-3-4:1.12.2.1
	macosx-8-4-branch:1.13.0.2
	macosx-8-4-branchpoint:1.13
	core-8-4-a3:1.13
	core-8-3-3:1.12.2.1
	dgp-privates-into-namespace:1.12.0.6
	tclpro-1-5-0:1.12
	core-8-4-win-speedup:1.12.0.4
	core-8-4-a2:1.12
	tclpro-1-4-1:1.12
	tclpro-1-4-0:1.12
	core-8-3-2:1.12
	ajuba-ajuba2-2-1-base:1.12
	ajuba-ajuba2-2-0:1.12
	core-8-4-a1:1.12
	core-8-3-1-branch:1.12.0.2
	core-8-3-1:1.12
	scriptics-sc-2-0-b5:1.12
	scriptics-sc-2-0-fixed:1.12
	scriptics-sc-2-0-b2:1.11
	scriptics-sc-2-0-b1:1.11
	core-8-3-0:1.11
	core-8-3-b2:1.11
	core-8-3-b1:1.10
	scriptics-sc-1-1:1.7
	scriptics-sc-1-1-b1:1.7
	core-8-2-3:1.7
	scriptics-sc-1-1-branch:1.7.0.10
	scriptics-sc-1-1-base:1.7
	scriptics-sc-1-0:1.7
	scriptics-sc-1-0-branch:1.7.0.8
	scriptics-sc-1-0-base:1.7
	core-8-2-2:1.7
	core-8-2-1:1.7
	scriptics-bc-1-0-b1:1.7
	core-8-2-1-branch:1.7.0.6
	scriptics-tclpro-1-3-0:1.7
	core-8-2-0:1.7
	core-8-2-b3-branch:1.7.0.2
	core-8-2-b3-base:1.7
	scriptics-tclpro-1-3-b4:1.7
	core-8-2-b2:1.7
	scriptics-tclpro-1-3-b3:1.7
	core-8-2-b1:1.7
	scriptics-tclpro-1-3-b2:1.7
	merge-to-mainline-5/21/99:1.7
	scriptics-tclpro-1-3-b2-branch:1.7.0.4
	core-8-1-1:1.7
	scriptics-tclpro-1-3-b1:1.7
	core-8-1-1-base:1.7
	core-8-1-0:1.7
	merge-to-mainline-4-29-99:1.7
	merge-to-mainline-4-23-99:1.7
	core-8-1-branch-old:1.1.0.4
	core-8-0-6-branch:1.4.0.6
	core-8-0-6-base:1.4
	core-8-0-5:1.4
	core-8-1-b3:1.1.4.10
	core-8-1-b2:1.1.4.5
	dev-8-1-stubs-branch:1.1.4.3.0.2
	dev-stubs-branch:1.4.0.4
	scriptics-tclpro-1-2:1.4
	scriptics-tclpro-1-2-b2:1.4
	core-8-1-merge-2/10/99:1.4
	core-8-0-5-branch:1.4.0.2
	core-8-0-5-base:1.4
	scriptics-tclpro-1-2-b1:1.3
	scriptics-tclpro-1-2-a1:1.3
	core-8-1-b1:1.1.4.2
	core-8-0-4:1.3
	core-8-1-a2:1.1.4.1
	core-8-0-2:1.1
	core-8-0-3:1.3;
locks; strict;
comment	@# @;


1.48
date	2010.08.03.16.14.35;	author dgp;	state Exp;
branches;
next	1.47;

1.47
date	2010.01.19.01.27.41;	author patthoyts;	state Exp;
branches;
next	1.46;

1.46
date	2008.10.08.18.57.47;	author dgp;	state Exp;
branches;
next	1.45;

1.45
date	2008.07.23.23.24.25;	author nijtmans;	state Exp;
branches;
next	1.44;

1.44
date	2007.12.13.15.27.55;	author dgp;	state Exp;
branches
	1.44.2.1;
next	1.43;

1.43
date	2007.10.30.01.09.36;	author hobbs;	state Exp;
branches;
next	1.42;

1.42
date	2007.05.09.12.52.44;	author das;	state Exp;
branches
	1.42.2.1;
next	1.41;

1.41
date	2005.11.16.02.51.38;	author jenglish;	state Exp;
branches;
next	1.40;

1.40
date	2004.10.05.22.04.45;	author hobbs;	state Exp;
branches;
next	1.39;

1.39
date	2004.06.24.12.45.44;	author dkf;	state Exp;
branches;
next	1.38;

1.38
date	2004.06.17.22.38.57;	author dkf;	state Exp;
branches;
next	1.37;

1.37
date	2004.06.16.20.03.19;	author jenglish;	state Exp;
branches;
next	1.36;

1.36
date	2003.11.18.01.47.51;	author dgp;	state Exp;
branches;
next	1.35;

1.35
date	2003.10.15.20.04.03;	author jenglish;	state Exp;
branches;
next	1.34;

1.34
date	2003.04.01.21.06.57;	author dgp;	state Exp;
branches;
next	1.33;

1.33
date	2003.03.18.16.30.42;	author dgp;	state Exp;
branches;
next	1.32;

1.32
date	2003.03.13.19.34.41;	author dgp;	state Exp;
branches;
next	1.31;

1.31
date	2003.03.12.03.25.52;	author mdejong;	state Exp;
branches;
next	1.30;

1.30
date	2003.03.12.00.25.41;	author mdejong;	state Exp;
branches;
next	1.29;

1.29
date	2002.11.07.22.27.04;	author mdejong;	state Exp;
branches
	1.29.2.1;
next	1.28;

1.28
date	2002.09.06.16.07.37;	author dgp;	state Exp;
branches;
next	1.27;

1.27
date	2002.08.08.21.02.16;	author dgp;	state Exp;
branches;
next	1.26;

1.26
date	2002.07.25.21.35.23;	author pspjuth;	state Exp;
branches;
next	1.25;

1.25
date	2002.07.15.18.10.47;	author dgp;	state Exp;
branches;
next	1.24;

1.24
date	2002.07.15.16.56.32;	author dgp;	state Exp;
branches;
next	1.23;

1.23
date	2002.07.13.21.52.34;	author dgp;	state Exp;
branches;
next	1.22;

1.22
date	2002.07.13.20.28.36;	author dgp;	state Exp;
branches;
next	1.21;

1.21
date	2002.07.12.21.08.49;	author dgp;	state Exp;
branches;
next	1.20;

1.20
date	2002.07.12.13.41.00;	author dgp;	state Exp;
branches;
next	1.19;

1.19
date	2002.06.22.10.13.26;	author hobbs;	state Exp;
branches;
next	1.18;

1.18
date	2002.06.14.22.52.04;	author hobbs;	state Exp;
branches;
next	1.17;

1.17
date	2002.06.13.21.35.09;	author mdejong;	state Exp;
branches;
next	1.16;

1.16
date	2002.06.12.19.02.49;	author mdejong;	state Exp;
branches;
next	1.15;

1.15
date	2002.05.24.09.50.11;	author mdejong;	state Exp;
branches;
next	1.14;

1.14
date	2001.12.04.03.07.43;	author mdejong;	state Exp;
branches;
next	1.13;

1.13
date	2001.03.28.17.27.10;	author dgp;	state Exp;
branches
	1.13.2.1;
next	1.12;

1.12
date	2000.03.29.00.09.07;	author ericm;	state Exp;
branches
	1.12.2.1
	1.12.4.1
	1.12.6.1;
next	1.11;

1.11
date	2000.01.12.11.45.36;	author hobbs;	state Exp;
branches;
next	1.10;

1.10
date	99.12.22.20.01.19;	author hobbs;	state Exp;
branches;
next	1.9;

1.9
date	99.12.16.02.13.49;	author wart;	state Exp;
branches;
next	1.8;

1.8
date	99.12.14.06.53.15;	author hobbs;	state Exp;
branches;
next	1.7;

1.7
date	99.04.21.21.53.31;	author rjohnson;	state Exp;
branches;
next	1.6;

1.6
date	99.04.19.23.54.58;	author hershey;	state Exp;
branches;
next	1.5;

1.5
date	99.04.16.01.51.42;	author stanton;	state Exp;
branches
	1.5.2.1;
next	1.4;

1.4
date	99.02.04.21.03.28;	author stanton;	state Exp;
branches;
next	1.3;

1.3
date	98.09.14.18.23.52;	author stanton;	state Exp;
branches;
next	1.2;

1.2
date	98.08.12.16.08.58;	author hershey;	state Exp;
branches;
next	1.1;

1.1
date	98.04.01.09.58.19;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.29.00.25.55;	author stanton;	state Exp;
branches;
next	1.1.4.2;

1.1.4.2
date	98.09.30.02.19.03;	author stanton;	state Exp;
branches;
next	1.1.4.3;

1.1.4.3
date	99.02.11.04.13.49;	author stanton;	state Exp;
branches;
next	1.1.4.4;

1.1.4.4
date	99.03.11.18.51.18;	author hershey;	state Exp;
branches;
next	1.1.4.5;

1.1.4.5
date	99.03.11.23.51.27;	author hershey;	state Exp;
branches;
next	1.1.4.6;

1.1.4.6
date	99.03.24.01.17.15;	author hershey;	state Exp;
branches;
next	1.1.4.7;

1.1.4.7
date	99.03.24.02.55.09;	author hershey;	state Exp;
branches;
next	1.1.4.8;

1.1.4.8
date	99.03.26.00.08.10;	author hershey;	state Exp;
branches;
next	1.1.4.9;

1.1.4.9
date	99.04.02.18.06.45;	author hershey;	state Exp;
branches;
next	1.1.4.10;

1.1.4.10
date	99.04.07.02.16.37;	author surles;	state Exp;
branches;
next	;

1.5.2.1
date	99.04.21.02.31.10;	author rjohnson;	state Exp;
branches;
next	;

1.12.2.1
date	2001.04.04.07.57.17;	author hobbs;	state Exp;
branches;
next	1.12.2.2;

1.12.2.2
date	2002.10.12.00.50.27;	author jenglish;	state Exp;
branches;
next	;

1.12.4.1
date	2002.04.02.20.57.59;	author hobbs;	state Exp;
branches;
next	;

1.12.6.1
date	2001.07.03.20.01.09;	author dgp;	state Exp;
branches;
next	;

1.13.2.1
date	2001.10.15.09.22.00;	author wolfsuit;	state Exp;
branches;
next	1.13.2.2;

1.13.2.2
date	2002.02.05.02.25.18;	author wolfsuit;	state Exp;
branches;
next	1.13.2.3;

1.13.2.3
date	2002.06.10.05.38.26;	author wolfsuit;	state Exp;
branches;
next	1.13.2.4;

1.13.2.4
date	2002.08.20.20.27.16;	author das;	state Exp;
branches;
next	;

1.29.2.1
date	2003.03.13.19.33.49;	author dgp;	state Exp;
branches;
next	1.29.2.2;

1.29.2.2
date	2003.03.18.16.19.10;	author dgp;	state Exp;
branches;
next	1.29.2.3;

1.29.2.3
date	2004.10.05.22.27.27;	author hobbs;	state Exp;
branches;
next	1.29.2.4;

1.29.2.4
date	2005.01.14.21.09.47;	author jenglish;	state Exp;
branches;
next	1.29.2.5;

1.29.2.5
date	2010.01.23.01.36.03;	author patthoyts;	state Exp;
branches;
next	;

1.42.2.1
date	2007.11.01.16.37.24;	author dgp;	state Exp;
branches;
next	;

1.44.2.1
date	2010.01.20.23.43.52;	author patthoyts;	state Exp;
branches;
next	1.44.2.2;

1.44.2.2
date	2010.08.03.16.14.27;	author dgp;	state Exp;
branches;
next	;


desc
@@


1.48
log
@Dup test IDs
@
text
@# This file is a Tcl script to test out Tk's interactions with
# the window manager, including the "wm" command.  It is organized
# in the standard fashion for Tcl tests.
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
# RCS: @@(#) $Id: unixWm.test,v 1.47 2010/01/19 01:27:41 patthoyts Exp $

package require tcltest 2.2
eval tcltest::configure $argv
tcltest::loadTestedCommands

namespace import -force ::tk::test:loadTkCommand

proc sleep ms {
    global x
    after $ms {set x 1}
    vwait x
}

# Procedure to set up a collection of top-level windows

proc makeToplevels {} {
    deleteWindows
    foreach i {.raise1 .raise2 .raise3} {
	toplevel $i
	wm geom $i 150x100+0+0
	update
    }
}

set i 1
foreach geom {+20+80 +80+20 +0+0} {
    destroy .t
    test unixWm-1.$i {initial window position} unix {
	toplevel .t -width 200 -height 150
	wm geom .t $geom
	update
	wm geom .t
    } 200x150$geom
    incr i
}

# The tests below are tricky because window managers don't all move
# windows correctly.  Try one motion and compute the window manager's
# error, then factor this error into the actual tests.  In other words,
# this just makes sure that things are consistent between moves.

set i 1
destroy .t
toplevel .t -width 100 -height 150
wm geom .t +200+200
update
wm geom .t +150+150
update
scan [wm geom .t] %dx%d+%d+%d width height x y
set xerr [expr 150-$x]
set yerr [expr 150-$y]
foreach geom {+20+80 +80+20 +0+0 -0-0 +0-0 -0+0 -10-5 -10+5 +10-5} {
    test unixWm-2.$i {moving window while mapped} unix {
	wm geom .t $geom
	update
	scan [wm geom .t] %dx%d%1s%d%1s%d width height xsign x ysign y
	format "%s%d%s%d" $xsign [eval expr $x$xsign$xerr] $ysign \
		[eval expr $y$ysign$yerr]
    } $geom
    incr i
}

set i 1
foreach geom {+20+80 +80+20 +0+0 -0-0 +0-0 -0+0 -10-5 -10+5 +10-5} {
    test unixWm-3.$i {moving window while iconified} unix {
	wm iconify .t
	sleep 200
	wm geom .t $geom
	update
	wm deiconify .t
	scan [wm geom .t] %dx%d%1s%d%1s%d width height xsign x ysign y
	format "%s%d%s%d" $xsign [eval expr $x$xsign$xerr] $ysign \
		[eval expr $y$ysign$yerr]
    } $geom
    incr i
}

set i 1
foreach geom {+20+80 +100+40 +0+0} {
    test unixWm-4.$i {moving window while withdrawn} unix {
	wm withdraw .t
	sleep 200
	wm geom .t $geom
	update
	wm deiconify .t
	wm geom .t
    } 100x150$geom
    incr i
}

test unixWm-5.1 {compounded state changes} {unix nonPortable} {
    destroy .t
    toplevel .t -width 200 -height 100
    wm geometry .t +100+100
    update
    wm withdraw .t
    wm deiconify .t
    list [winfo ismapped .t] [wm state .t]
} {1 normal}
test unixWm-5.2 {compounded state changes} {unix nonPortable} {
    destroy .t
    toplevel .t -width 200 -height 100
    wm geometry .t +100+100
    update
    wm withdraw .t
    wm deiconify .t
    wm withdraw .t
    list [winfo ismapped .t] [wm state .t]
} {0 withdrawn}
test unixWm-5.3 {compounded state changes} {unix nonPortable} {
    destroy .t
    toplevel .t -width 200 -height 100
    wm geometry .t +100+100
    update
    wm iconify .t
    wm deiconify .t
    wm iconify .t
    wm deiconify .t
    list [winfo ismapped .t] [wm state .t]
} {1 normal}
test unixWm-5.4 {compounded state changes} {unix nonPortable} {
    destroy .t
    toplevel .t -width 200 -height 100
    wm geometry .t +100+100
    update
    wm iconify .t
    wm deiconify .t
    wm iconify .t
    list [winfo ismapped .t] [wm state .t]
} {0 iconic}
test unixWm-5.5 {compounded state changes} {unix nonPortable} {
    destroy .t
    toplevel .t -width 200 -height 100
    wm geometry .t +100+100
    update
    wm iconify .t
    wm withdraw .t
    list [winfo ismapped .t] [wm state .t]
} {0 withdrawn}
test unixWm-5.6 {compounded state changes} {unix nonPortable} {
    destroy .t
    toplevel .t -width 200 -height 100
    wm geometry .t +100+100
    update
    wm iconify .t
    wm withdraw .t
    wm deiconify .t
    list [winfo ismapped .t] [wm state .t]
} {1 normal}
test unixWm-5.7 {compounded state changes} {unix nonPortable} {
    destroy .t
    toplevel .t -width 200 -height 100
    wm geometry .t +100+100
    update
    wm withdraw .t
    wm iconify .t
    list [winfo ismapped .t] [wm state .t]
} {0 iconic}

destroy .t
toplevel .t -width 200 -height 100
wm geom .t +10+10
wm minsize .t 1 1
update
test unixWm-6.1 {size changes} unix {
    .t config -width 180 -height 150
    update
    wm geom .t
} 180x150+10+10
test unixWm-6.2 {size changes} unix {
    wm geom .t 250x60
    .t config -width 170 -height 140
    update
    wm geom .t
} 250x60+10+10
test unixWm-6.3 {size changes} unix {
    wm geom .t 250x60
    .t config -width 170 -height 140
    wm geom .t {}
    update
    wm geom .t
} 170x140+10+10
test unixWm-6.4 {size changes} {unix nonPortable userInteraction} {
    wm minsize .t 1 1
    update
    puts stdout "Please resize window \"t\" with the mouse (but don't move it!),"
    puts -nonewline stdout "then hit return: "
    flush stdout
    gets stdin
    update
    set width [winfo width .t]
    set height [winfo height .t]
    .t config -width 230 -height 110
    update
    incr width -[winfo width .t]
    incr height -[winfo height .t]
    wm geom .t {}
    update
    set w2 [winfo width .t]
    set h2 [winfo height .t]
    .t config -width 114 -height 261
    update
    list $width $height $w2 $h2 [wm geom .t]
} {0 0 230 110 114x261+10+10}

# I don't know why the wait below is needed, but without it the test
# fails under twm.
sleep 200

test unixWm-6.5 {window initially iconic} {unix nonPortable} {
    destroy .t
    toplevel .t -width 100 -height 30
    wm geometry .t +0+0
    wm title .t 2
    wm iconify .t
    update idletasks
    wm withdraw .t
    wm deiconify .t
    list [winfo ismapped .t] [wm state .t]
} {1 normal}

destroy .m
toplevel .m
wm overrideredirect .m 1
foreach i {{Test label} Another {Yet another} {Last label}} j {1 2 3} {
    label .m.$j -text $i
}
wm geometry .m +[expr 100 - [winfo vrootx .]]+[expr 200 - [winfo vrooty .]]
update
test unixWm-7.1 {override_redirect and Tk_MoveTopLevelWindow} unix {
    list [winfo ismapped .m] [wm state .m] [winfo x .m] [winfo y .m]
} {1 normal 100 200}
wm geometry .m +[expr 150 - [winfo vrootx .]]+[expr 210 - [winfo vrooty .]]
update
test unixWm-7.2 {override_redirect and Tk_MoveTopLevelWindow} unix {
    list [winfo ismapped .m] [wm state .m] [winfo x .m] [winfo y .m]
} {1 normal 150 210}
wm withdraw .m
test unixWm-7.3 {override_redirect and Tk_MoveTopLevelWindow} unix {
    list [winfo ismapped .m]
} 0
destroy .m
destroy .t

test unixWm-8.1 {icon windows} unix {
    destroy .t
    destroy .icon
    toplevel .t -width 100 -height 30
    wm geometry .t +0+0
    toplevel .icon -width 50 -height 50 -bg red
    wm iconwindow .t .icon
    list [catch {wm withdraw .icon} msg] $msg
} {1 {can't withdraw .icon: it is an icon for .t}}
test unixWm-8.2 {icon windows} unix {
    destroy .t
    toplevel .t -width 100 -height 30
    list [catch {wm iconwindow} msg] $msg
} {1 {wrong # args: should be "wm option window ?arg ...?"}}
test unixWm-8.3 {icon windows} unix {
    destroy .t
    toplevel .t -width 100 -height 30
    list [catch {wm iconwindow .t b c} msg] $msg
} {1 {wrong # args: should be "wm iconwindow window ?pathName?"}}
test unixWm-8.4 {icon windows} unix {
    destroy .t
    destroy .icon
    toplevel .t -width 100 -height 30
    wm geom .t +0+0
    set result [wm iconwindow .t]
    toplevel .icon -width 50 -height 50 -bg red
    wm iconwindow .t .icon
    lappend result [wm iconwindow .t] [wm state .icon]
    wm iconwindow .t {}
    lappend result [wm iconwindow .t] [wm state .icon]
    update
    lappend result [winfo ismapped .t] [winfo ismapped .icon]
    wm iconify .t
    update
    lappend result [winfo ismapped .t] [winfo ismapped .icon]
} {.icon icon {} withdrawn 1 0 0 0}
test unixWm-8.5 {icon windows} unix {
    destroy .t
    toplevel .t -width 100 -height 30
    list [catch {wm iconwindow .t .gorp} msg] $msg
} {1 {bad window path name ".gorp"}}
test unixWm-8.6 {icon windows} unix {
    destroy .t
    toplevel .t -width 100 -height 30
    frame .t.icon -width 50 -height 50 -bg red
    list [catch {wm iconwindow .t .t.icon} msg] $msg
} {1 {can't use .t.icon as icon window: not at top level}}
test unixWm-8.7 {icon windows} unix {
    destroy .t
    destroy .icon
    toplevel .t -width 100 -height 30
    wm geom .t +0+0
    toplevel .icon -width 50 -height 50 -bg red
    toplevel .icon2 -width 50 -height 50 -bg green
    wm iconwindow .t .icon
    set result "[wm iconwindow .t] [wm state .icon] [wm state .icon2]"
    wm iconwindow .t .icon2
    lappend result [wm iconwindow .t] [wm state .icon] [wm state .icon2]
} {.icon icon normal .icon2 withdrawn icon}
destroy .icon2
test unixWm-8.8 {icon windows} unix {
    destroy .t
    destroy .icon
    toplevel .icon -width 50 -height 50 -bg red
    wm geom .icon +0+0
    update
    set result [winfo ismapped .icon]
    toplevel .t -width 100 -height 30
    wm geom .t +0+0
    tkwait visibility .t	;# Needed to keep tvtwm happy.
    wm iconwindow .t .icon
    sleep 500
    lappend result [winfo ismapped .t] [winfo ismapped .icon]
} {1 1 0}
test unixWm-8.9 {icon windows} {unix nonPortable} {
    # This test is non-portable because some window managers will
    # destroy an icon window when it's associated window is destroyed.

    destroy .t
    destroy .icon
    toplevel .t -width 100 -height 30
    toplevel .icon -width 50 -height 50 -bg red
    wm geom .t +0+0
    wm iconwindow .t .icon
    update
    set result "[wm state .icon] [winfo ismapped .t] [winfo ismapped .icon]"
    destroy .t
    wm geom .icon +0+0
    update
    lappend result [winfo ismapped .icon] [wm state .icon]
    wm deiconify .icon
    update
    lappend result [winfo ismapped .icon] [wm state .icon]
} {icon 1 0 0 withdrawn 1 normal}

test unixWm-8.10.1 {test for memory leaks} unix {
    wm title .t "This is a long long long long long long title"
    wm title .t "This is a long long long long long long title"
    wm title .t "This is a long long long long long long title"
    wm title .t "This is a long long long long long long title"
    wm title .t "This is a long long long long long long title"
    wm title .t "This is a long long long long long long title"
    wm title .t "This is a long long long long long long title"
    wm title .t "This is a long long long long long long title"
    set x 1
} 1
test unixWm-8.10.2 {test for memory leaks} unix {
    wm group .t .
    wm group .t .
    wm group .t .
    wm group .t .
    wm group .t .
    wm group .t .
    wm group .t .
    wm group .t .
    wm group .t .
    wm group .t .
    set x 1
} 1

test unixWm-9.1 {TkWmMapWindow procedure, client property} {unix testwrapper} {
    destroy .t
    toplevel .t -width 100 -height 50
    wm geom .t +0+0
    wm client .t Test_String
    update
    testprop [testwrapper .t] WM_CLIENT_MACHINE
} {Test_String}
test unixWm-9.2 {TkWmMapWindow procedure, command property} {unix testwrapper} {
    destroy .t
    toplevel .t -width 100 -height 50
    wm geom .t +0+0
    wm command .t "test command"
    update
    testprop [testwrapper .t] WM_COMMAND
} {test
command
}
test unixWm-9.3 {TkWmMapWindow procedure, iconic windows} unix {
    destroy .t
    toplevel .t -width 100 -height 300 -bg blue
    wm geom .t +0+0
    wm iconify .t
    sleep 500
    winfo ismapped .t
} {0}
test unixWm-9.4 {TkWmMapWindow procedure, icon windows} unix {
    destroy .t
    sleep 500
    toplevel .t -width 100 -height 50 -bg blue
    wm iconwindow . .t
    update
    set result [winfo ismapped .t]
} {0}
test unixWm-9.5 {TkWmMapWindow procedure, normal windows} unix {
    destroy .t
    toplevel .t -width 200 -height 20
    wm geom .t +0+0
    update
    winfo ismapped .t
} {1}

test unixWm-10.1 {TkWmDeadWindow procedure, canceling UpdateGeometry idle handler} unix {
    destroy .t
    toplevel .t -width 100 -height 50
    wm geom .t +0+0
    update
    .t configure -width 200 -height 100
    destroy .t
} {}
test unixWm-10.2 {TkWmDeadWindow procedure, destroying menubar} {unix testmenubar} {
    destroy .t
    destroy .f
    toplevel .t -width 300 -height 200 -bd 2 -relief raised
    wm geom .t +0+0
    update
    frame .f -width 400 -height 30 -bd 2 -relief raised -bg green
    bind .f <Destroy> {lappend result destroyed}
    testmenubar window .t .f
    update
    set result {}
    destroy .t
    lappend result [winfo exists .f]
} {destroyed 0}

test unixWm-11.1 {Tk_WmCmd procedure, miscellaneous errors} unix {
    list [catch {wm} msg] $msg
} {1 {wrong # args: should be "wm option window ?arg ...?"}}
test unixWm-11.2 {Tk_WmCmd procedure, miscellaneous errors} unix {
    list [catch {wm aspect} msg] $msg
} {1 {wrong # args: should be "wm option window ?arg ...?"}}
test unixWm-11.3 {Tk_WmCmd procedure, miscellaneous errors} unix {
    list [catch {wm iconify bogus} msg] $msg
} {1 {bad window path name "bogus"}}
test unixWm-11.4 {Tk_WmCmd procedure, miscellaneous errors} unix {
    destroy .b
    button .b -text hello
    list [catch {wm geometry .b} msg] $msg
} {1 {window ".b" isn't a top-level window}}

destroy .t
destroy .icon

toplevel .t -width 100 -height 50
wm geom .t +0+0
update

test unixWm-12.1 {Tk_WmCmd procedure, "aspect" option} unix {
    list [catch {wm aspect .t 12} msg] $msg
} {1 {wrong # args: should be "wm aspect window ?minNumer minDenom maxNumer maxDenom?"}}
test unixWm-12.2 {Tk_WmCmd procedure, "aspect" option} unix {
    list [catch {wm aspect .t 12 13 14 15 16} msg] $msg
} {1 {wrong # args: should be "wm aspect window ?minNumer minDenom maxNumer maxDenom?"}}
test unixWm-12.3 {Tk_WmCmd procedure, "aspect" option} unix {
    set result {}
    lappend result [wm aspect .t]
    wm aspect .t 3 4 10 2
    lappend result [wm aspect .t]
    wm aspect .t {} {} {} {}
    lappend result [wm aspect .t]
} {{} {3 4 10 2} {}}
test unixWm-12.4 {Tk_WmCmd procedure, "aspect" option} unix {
    list [catch {wm aspect .t bad 14 15 16} msg] $msg
} {1 {expected integer but got "bad"}}
test unixWm-12.5 {Tk_WmCmd procedure, "aspect" option} unix {
    list [catch {wm aspect .t 13 foo 15 16} msg] $msg
} {1 {expected integer but got "foo"}}
test unixWm-12.6 {Tk_WmCmd procedure, "aspect" option} unix {
    list [catch {wm aspect .t 13 14 bar 16} msg] $msg
} {1 {expected integer but got "bar"}}
test unixWm-12.7 {Tk_WmCmd procedure, "aspect" option} unix {
    list [catch {wm aspect .t 13 14 15 baz} msg] $msg
} {1 {expected integer but got "baz"}}
test unixWm-12.8 {Tk_WmCmd procedure, "aspect" option} unix {
    list [catch {wm aspect .t 0 14 15 16} msg] $msg
} {1 {aspect number can't be <= 0}}
test unixWm-12.9 {Tk_WmCmd procedure, "aspect" option} unix {
    list [catch {wm aspect .t 13 0 15 16} msg] $msg
} {1 {aspect number can't be <= 0}}
test unixWm-12.10 {Tk_WmCmd procedure, "aspect" option} unix {
    list [catch {wm aspect .t 13 14 0 16} msg] $msg
} {1 {aspect number can't be <= 0}}
test unixWm-12.11 {Tk_WmCmd procedure, "aspect" option} unix {
    list [catch {wm aspect .t 13 14 15 0} msg] $msg
} {1 {aspect number can't be <= 0}}

test unixWm-13.1 {Tk_WmCmd procedure, "client" option} unix {
    list [catch {wm client .t x y} msg] $msg
} {1 {wrong # args: should be "wm client window ?name?"}}
test unixWm-13.2 {Tk_WmCmd procedure, "client" option} {unix testwrapper} {
    set result {}
    lappend result [wm client .t]
    wm client .t Test_String
    lappend result [testprop [testwrapper .t] WM_CLIENT_MACHINE]
    wm client .t New
    lappend result [wm client .t]
    wm client .t {}
    lappend result [wm client .t] [testprop [testwrapper .t] WM_CLIENT_MACHINE]
} {{} Test_String New {} {}}
test unixWm-13.3 {Tk_WmCmd procedure, "client" option, unmapped window} unix {
    destroy .t2
    toplevel .t2
    wm client .t2 Test_String
    wm client .t2 {}
    wm client .t2 Test_String
    destroy .t2
} {}

test unixWm-14.1 {Tk_WmCmd procedure, "colormapwindows" option} unix {
    list [catch {wm colormapwindows .t 12 13} msg] $msg
} {1 {wrong # args: should be "wm colormapwindows window ?windowList?"}}
test unixWm-14.2 {Tk_WmCmd procedure, "colormapwindows" option} unix {
    destroy .t2
    toplevel .t2 -width 200 -height 200 -colormap new
    wm geom .t2 +0+0
    frame .t2.a -width 100 -height 30
    frame .t2.b -width 100 -height 30 -colormap new
    pack .t2.a .t2.b -side top
    update
    set x [wm colormapwindows .t2]
    frame .t2.c -width 100 -height 30 -colormap new
    pack .t2.c -side top
    update
    list $x [wm colormapwindows .t2]
} {{.t2.b .t2} {.t2.b .t2.c .t2}}
test unixWm-14.3 {Tk_WmCmd procedure, "colormapwindows" option} unix {
    list [catch {wm col . "a \{"} msg] $msg
} {1 {unmatched open brace in list}}
test unixWm-14.4 {Tk_WmCmd procedure, "colormapwindows" option} unix {
    list [catch {wm colormapwindows . foo} msg] $msg
} {1 {bad window path name "foo"}}
test unixWm-14.5 {Tk_WmCmd procedure, "colormapwindows" option} unix {
    destroy .t2
    toplevel .t2 -width 200 -height 200 -colormap new
    wm geom .t2 +0+0
    frame .t2.a -width 100 -height 30
    frame .t2.b -width 100 -height 30
    frame .t2.c -width 100 -height 30
    pack .t2.a .t2.b .t2.c -side top
    wm colormapwindows .t2 {.t2.c .t2 .t2.a}
    wm colormapwindows .t2
} {.t2.c .t2 .t2.a}
test unixWm-14.6 {Tk_WmCmd procedure, "colormapwindows" option} unix {
    destroy .t2
    toplevel .t2 -width 200 -height 200
    wm geom .t2 +0+0
    frame .t2.a -width 100 -height 30
    frame .t2.b -width 100 -height 30
    frame .t2.c -width 100 -height 30
    pack .t2.a .t2.b .t2.c -side top
    wm colormapwindows .t2 {.t2.b .t2.a}
    wm colormapwindows .t2
} {.t2.b .t2.a}
test unixWm-14.7 {Tk_WmCmd procedure, "colormapwindows" option} unix {
    destroy .t2
    toplevel .t2 -width 200 -height 200 -colormap new
    wm geom .t2 +0+0
    set x [wm colormapwindows .t2]
    wm colormapwindows .t2 {}
    list $x [wm colormapwindows .t2]
} {{} {}}
destroy .t2

test unixWm-15.1 {Tk_WmCmd procedure, "command" option} unix {
    list [catch {wm command .t 12 13} msg] $msg
} {1 {wrong # args: should be "wm command window ?value?"}}
test unixWm-15.2 {Tk_WmCmd procedure, "command" option} unix {
    list [catch {wm command .t 12 13} msg] $msg
} {1 {wrong # args: should be "wm command window ?value?"}}
test unixWm-15.3 {Tk_WmCmd procedure, "command" option} {unix testwrapper} {
    set result {}
    lappend result [wm command .t]
    wm command .t "test command"
    lappend result [testprop [testwrapper .t] WM_COMMAND]
    wm command .t "new command"
    lappend result [wm command .t]
    wm command .t {}
    lappend result [wm command .t] [testprop [testwrapper .t] WM_COMMAND]
} {{} {test
command
} {new command} {} {}}
test unixWm-15.4 {Tk_WmCmd procedure, "command" option, window not mapped} unix {
    destroy .t2
    toplevel .t2
    wm geom .t2 +0+0
    wm command .t2 "test command"
    wm command .t2 "new command"
    wm command .t2 {}
    destroy .t2
} {}
test unixWm-15.5 {Tk_WmCmd procedure, "command" option} unix {
    list [catch {wm command .t "a \{b"} msg] $msg
} {1 {unmatched open brace in list}}

test unixWm-16.1 {Tk_WmCmd procedure, "deiconify" option} unix {
    list [catch {wm deiconify .t 12} msg] $msg
} {1 {wrong # args: should be "wm deiconify window"}}
test unixWm-16.2 {Tk_WmCmd procedure, "deiconify" option} unix {
    destroy .icon
    toplevel .icon -width 50 -height 50 -bg red
    wm iconwindow .t .icon
    set result [list [catch {wm deiconify .icon} msg] $msg]
    destroy .icon
    set result
} {1 {can't deiconify .icon: it is an icon for .t}}
test unixWm-16.3 {Tk_WmCmd procedure, "deiconify" option} unix {
    wm iconify .t
    set result {}
    lappend result [winfo ismapped .t] [wm state .t]
    wm deiconify .t
    lappend result [winfo ismapped .t] [wm state .t]
} {0 iconic 1 normal}

test unixWm-17.1 {Tk_WmCmd procedure, "focusmodel" option} unix {
    list [catch {wm focusmodel .t 12 13} msg] $msg
} {1 {wrong # args: should be "wm focusmodel window ?active|passive?"}}
test unixWm-17.2 {Tk_WmCmd procedure, "focusmodel" option} unix {
    list [catch {wm focusmodel .t bogus} msg] $msg
} {1 {bad argument "bogus": must be active or passive}}
test unixWm-17.3 {Tk_WmCmd procedure, "focusmodel" option} unix {
    set result {} 
    lappend result [wm focusmodel .t]
    wm focusmodel .t active
    lappend result [wm focusmodel .t]
    wm focusmodel .t passive
    lappend result [wm focusmodel .t]
    set result
} {passive active passive}

test unixWm-18.1 {Tk_WmCmd procedure, "frame" option} unix {
    list [catch {wm frame .t 12} msg] $msg
} {1 {wrong # args: should be "wm frame window"}}
test unixWm-18.2 {Tk_WmCmd procedure, "frame" option} {unix nonPortable} {
    expr [wm frame .t] == [winfo id .t]
} {0}
test unixWm-18.3 {Tk_WmCmd procedure, "frame" option} {unix nonPortable} {
    destroy .t2
    toplevel .t2
    wm geom .t2 +0+0
    wm overrideredirect .t2 1
    update
    set result [expr [wm frame .t2] == [winfo id .t2]]
    destroy .t2
    set result
} {1}

test unixWm-19.1 {Tk_WmCmd procedure, "geometry" option} unix {
    list [catch {wm geometry .t 12 13} msg] $msg
} {1 {wrong # args: should be "wm geometry window ?newGeometry?"}}
test unixWm-19.2 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} {
    wm geometry .t -1+5
    update
    wm geometry .t
} {100x50-1+5}
test unixWm-19.3 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} {
    wm geometry .t +10-4
    update
    wm geometry .t
} {100x50+10-4}
test unixWm-19.4 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} {
    destroy .t2
    toplevel .t2
    wm geom .t2 -5+10
    listbox .t2.l -width 30 -height 12 -setgrid 1
    pack .t2.l
    update
    set result [wm geometry .t2]
    destroy .t2
    set result
} {30x12-5+10}
test unixWm-19.5 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} {
    wm geometry .t 150x300+5+6
    update
    set result {}
    lappend result [wm geometry .t]
    wm geometry .t {}
    update
    lappend result [wm geometry .t]
} {150x300+5+6 100x50+5+6}
test unixWm-19.6 {Tk_WmCmd procedure, "geometry" option} unix {
    list [catch {wm geometry .t qrs} msg] $msg
} {1 {bad geometry specifier "qrs"}}

test unixWm-20.1 {Tk_WmCmd procedure, "grid" option} unix {
    list [catch {wm grid .t 12 13} msg] $msg
} {1 {wrong # args: should be "wm grid window ?baseWidth baseHeight widthInc heightInc?"}}
test unixWm-20.2 {Tk_WmCmd procedure, "grid" option} unix {
    list [catch {wm grid .t 12 13 14 15 16} msg] $msg
} {1 {wrong # args: should be "wm grid window ?baseWidth baseHeight widthInc heightInc?"}}
test unixWm-20.3 {Tk_WmCmd procedure, "grid" option} unix {
    set result {}
    lappend result [wm grid .t]
    wm grid .t 5 6 20 10
    lappend result [wm grid .t]
    wm grid .t {} {} {} {}
    lappend result [wm grid .t]
} {{} {5 6 20 10} {}}
test unixWm-20.4 {Tk_WmCmd procedure, "grid" option} unix {
    list [catch {wm grid .t bad 10 11 12} msg] $msg
} {1 {expected integer but got "bad"}}
test unixWm-20.5 {Tk_WmCmd procedure, "grid" option} unix {
    list [catch {wm grid .t -1 11 12 13} msg] $msg
} {1 {baseWidth can't be < 0}}
test unixWm-20.6 {Tk_WmCmd procedure, "grid" option} unix {
    list [catch {wm grid .t 10 foo 12 13} msg] $msg
} {1 {expected integer but got "foo"}}
test unixWm-20.7 {Tk_WmCmd procedure, "grid" option} unix {
    list [catch {wm grid .t 10 -11 12 13} msg] $msg
} {1 {baseHeight can't be < 0}}
test unixWm-20.8 {Tk_WmCmd procedure, "grid" option} unix {
    list [catch {wm grid .t 10 11 bar 13} msg] $msg
} {1 {expected integer but got "bar"}}
test unixWm-20.9 {Tk_WmCmd procedure, "grid" option} unix {
    list [catch {wm grid .t 10 11 -2 13} msg] $msg
} {1 {widthInc can't be <= 0}}
test unixWm-20.10 {Tk_WmCmd procedure, "grid" option} unix {
    list [catch {wm grid .t 10 11 12 bogus} msg] $msg
} {1 {expected integer but got "bogus"}}
test unixWm-20.11 {Tk_WmCmd procedure, "grid" option} unix {
    list [catch {wm grid .t 10 11 12 -1} msg] $msg
} {1 {heightInc can't be <= 0}}

destroy .t
destroy .icon
toplevel .t -width 100 -height 50
wm geom .t +0+0
update

test unixWm-21.1 {Tk_WmCmd procedure, "group" option} unix {
    list [catch {wm group .t 12 13} msg] $msg
} {1 {wrong # args: should be "wm group window ?pathName?"}}
test unixWm-21.2 {Tk_WmCmd procedure, "group" option} unix {
    list [catch {wm group .t bogus} msg] $msg
} {1 {bad window path name "bogus"}}
test unixWm-21.3 {Tk_WmCmd procedure, "group" option} {unix testwrapper} {
    set result {}
    lappend result [wm group .t]
    wm group .t .
    set bit [format 0x%x [expr 0x40 & [lindex [testprop [testwrapper .t] \
	    WM_HINTS] 0]]]
    lappend result [wm group .t] $bit
    wm group .t {}
    set bit [format 0x%x [expr 0x40 & [lindex [testprop [testwrapper .t] \
	    WM_HINTS] 0]]]
    lappend result [wm group .t] $bit
} {{} . 0x40 {} 0x0}
test unixWm-21.4 {Tk_WmCmd procedure, "group" option, make window exist} {unix testwrapper} {
    destroy .t2
    toplevel .t2
    wm geom .t2 +0+0
    wm group .t .t2
    set hints [testprop [testwrapper .t] WM_HINTS]
    set result [expr [testwrapper .t2] - [lindex $hints 8]]
    destroy .t2
    set result
} {0}
test unixWm-21.5 {Tk_WmCmd procedure, "group" option, create leader wrapper} {unix testwrapper} {
    destroy .t2
    destroy .t3
    toplevel .t2 -width 120 -height 300
    wm geometry .t2 +0+0
    toplevel .t3 -width 120 -height 300
    wm geometry .t2 +0+0
    set result [list [testwrapper .t2]]
    wm group .t3 .t2
    lappend result [expr {[testwrapper .t2] == ""}]
    destroy .t2 .t3
    set result
} {{} 0}

test unixWm-22.1 {Tk_WmCmd procedure, "iconbitmap" option} unix {
    list [catch {wm iconbitmap .t 12 13} msg] $msg
} {1 {wrong # args: should be "wm iconbitmap window ?bitmap?"}}
test unixWm-22.2 {Tk_WmCmd procedure, "iconbitmap" option} {unix testwrapper} {
    set result {}
    lappend result [wm iconbitmap .t]
    wm iconbitmap .t questhead
    set bit [format 0x%x [expr 0x4 & [lindex [testprop [testwrapper .t] \
	    WM_HINTS] 0]]]
    lappend result [wm iconbitmap .t] $bit
    wm iconbitmap .t {}
    set bit [format 0x%x [expr 0x4 & [lindex [testprop [testwrapper .t] \
	    WM_HINTS] 0]]]
    lappend result [wm iconbitmap .t] $bit
} {{} questhead 0x4 {} 0x0}
test unixWm-22.3 {Tk_WmCmd procedure, "iconbitmap" option} unix {
    list [catch {wm iconbitmap .t bad-bitmap} msg] $msg
} {1 {bitmap "bad-bitmap" not defined}}

test unixWm-23.1 {Tk_WmCmd procedure, "iconify" option} unix {
    list [catch {wm iconify .t 12} msg] $msg
} {1 {wrong # args: should be "wm iconify window"}}
test unixWm-23.2 {Tk_WmCmd procedure, "iconify" option} unix {
    destroy .t2
    toplevel .t2
    wm overrideredirect .t2 1
    set result [list [catch {wm iconify .t2} msg] $msg]
    destroy .t2
    set result
} {1 {can't iconify ".t2": override-redirect flag is set}}
test unixWm-23.3 {Tk_WmCmd procedure, "iconify" option} unix {
    destroy .t2
    toplevel .t2
    wm geom .t2 +0+0
    wm transient .t2 .t
    set result [list [catch {wm iconify .t2} msg] $msg]
    destroy .t2
    set result
} {1 {can't iconify ".t2": it is a transient}}
test unixWm-23.4 {Tk_WmCmd procedure, "iconify" option} unix {
    destroy .t2
    toplevel .t2
    wm geom .t2 +0+0
    wm iconwindow .t .t2
    set result [list [catch {wm iconify .t2} msg] $msg]
    destroy .t2
    set result
} {1 {can't iconify .t2: it is an icon for .t}}
test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} unix {
    destroy .t2
    toplevel .t2
    wm geom .t2 +0+0
    update
    wm iconify .t2
    update
    set result [winfo ismapped .t2]
    destroy .t2
    set result
} {0}
test unixWm-23.6 {Tk_WmCmd procedure, "iconify" option} unix {
    destroy .t2
    toplevel .t2
    wm geom .t2 -0+0
    update
    set result [winfo ismapped .t2]
    wm iconify .t2
    update
    lappend result [winfo ismapped .t2]
    destroy .t2
    set result
} {1 0}

test unixWm-24.1 {Tk_WmCmd procedure, "iconmask" option} unix {
    list [catch {wm iconmask .t 12 13} msg] $msg
} {1 {wrong # args: should be "wm iconmask window ?bitmap?"}}
test unixWm-24.2 {Tk_WmCmd procedure, "iconmask" option} {unix testwrapper} {
    set result {}
    lappend result [wm iconmask .t]
    wm iconmask .t questhead
    set bit [format 0x%x [expr 0x20 & [lindex [testprop [testwrapper .t] \
	    WM_HINTS] 0]]]
    lappend result [wm iconmask .t] $bit
    wm iconmask .t {}
    set bit [format 0x%x [expr 0x20 & [lindex [testprop [testwrapper .t] \
	    WM_HINTS] 0]]]
    lappend result [wm iconmask .t] $bit
} {{} questhead 0x20 {} 0x0}
test unixWm-24.3 {Tk_WmCmd procedure, "iconmask" option} unix {
    list [catch {wm iconmask .t bogus} msg] $msg
} {1 {bitmap "bogus" not defined}}

test unixWm-25.1 {Tk_WmCmd procedure, "iconname" option} unix {
    list [catch {wm icon .t} msg] $msg
} {1 {ambiguous option "icon": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, forget, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, manage, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
test unixWm-25.2 {Tk_WmCmd procedure, "iconname" option} unix {
    list [catch {wm iconname .t 12 13} msg] $msg
} {1 {wrong # args: should be "wm iconname window ?newName?"}}
test unixWm-25.3 {Tk_WmCmd procedure, "iconname" option} {unix testwrapper} {
    set result {}
    lappend result [wm iconname .t]
    wm iconname .t test_name
    lappend result [wm iconname .t] [testprop [testwrapper .t] WM_ICON_NAME]
    wm iconname .t {}
    lappend result [wm iconname .t] [testprop [testwrapper .t] WM_ICON_NAME]
} {{} test_name test_name {} {}}

test unixWm-26.1 {Tk_WmCmd procedure, "iconposition" option} unix {
    list [catch {wm iconposition .t 12} msg] $msg
} {1 {wrong # args: should be "wm iconposition window ?x y?"}}
test unixWm-26.2 {Tk_WmCmd procedure, "iconposition" option} unix {
    list [catch {wm iconposition .t 12 13 14} msg] $msg
} {1 {wrong # args: should be "wm iconposition window ?x y?"}}
test unixWm-26.3 {Tk_WmCmd procedure, "iconposition" option} {unix testwrapper} {
    set result {}
    lappend result [wm iconposition .t]
    wm iconposition .t 10 15
    set prop [testprop [testwrapper .t] WM_HINTS]
    lappend result [wm iconposition .t] [lindex $prop 5] [lindex $prop 6]
    lappend result  [format 0x%x [expr 0x10 & [lindex $prop 0]]]
    wm iconposition .t {} {}
    set bit [format 0x%x [expr 0x10 & [lindex [testprop [testwrapper .t] \
	    WM_HINTS] 0]]]
    lappend result [wm iconposition .t] $bit
} {{} {10 15} 0xa 0xf 0x10 {} 0x0}
test unixWm-26.4 {Tk_WmCmd procedure, "iconposition" option} unix {
    list [catch {wm iconposition .t bad 13} msg] $msg
} {1 {expected integer but got "bad"}}
test unixWm-26.5 {Tk_WmCmd procedure, "iconposition" option} unix {
    list [catch {wm iconposition .t 13 lousy} msg] $msg
} {1 {expected integer but got "lousy"}}

test unixWm-27.1 {Tk_WmCmd procedure, "iconwindow" option} unix {
    list [catch {wm iconwindow .t 12 13} msg] $msg
} {1 {wrong # args: should be "wm iconwindow window ?pathName?"}}
test unixWm-27.2 {Tk_WmCmd procedure, "iconwindow" option} {unix testwrapper} {
    destroy .icon
    toplevel .icon -width 50 -height 50 -bg green
    set result {}
    lappend result [wm iconwindow .t]
    wm iconwindow .t .icon
    set prop [testprop [testwrapper .t] WM_HINTS]
    lappend result [wm iconwindow .t] [wm state .icon]
    lappend result [format 0x%x [expr 0x8 & [lindex $prop 0]]]
    lappend result [expr [testwrapper .icon] == [lindex $prop 4]]
    wm iconwindow .t {}
    set bit [format 0x%x [expr 0x8 & [lindex [testprop [testwrapper .t] \
	    WM_HINTS] 0]]]
    lappend result [wm iconwindow .t]  [wm state .icon] $bit
    destroy .icon
    set result
} {{} .icon icon 0x8 1 {} withdrawn 0x0}
test unixWm-27.3 {Tk_WmCmd procedure, "iconwindow" option} unix {
    list [catch {wm iconwindow .t bogus} msg] $msg
} {1 {bad window path name "bogus"}}
test unixWm-27.4 {Tk_WmCmd procedure, "iconwindow" option} unix {
    destroy .b
    button .b -text Help
    set result [list [catch {wm iconwindow .t .b} msg] $msg]
    destroy .b
    set result
} {1 {can't use .b as icon window: not at top level}}
test unixWm-27.5 {Tk_WmCmd procedure, "iconwindow" option} unix {
    destroy .icon
    toplevel .icon -width 50 -height 50 -bg green
    destroy .t2
    toplevel .t2
    wm geom .t2 -0+0
    wm iconwindow .t2 .icon
    set result [list [catch {wm iconwindow .t .icon} msg] $msg]
    destroy .t2
    destroy .icon
    set result
} {1 {.icon is already an icon for .t2}}
test unixWm-27.6 {Tk_WmCmd procedure, "iconwindow" option, changing icons} unix {
    destroy .icon
    destroy .icon2
    toplevel .icon -width 50 -height 50 -bg green
    toplevel .icon2 -width 50 -height 50 -bg red
    set result {}
    wm iconwindow .t .icon
    lappend result [wm state .icon] [wm state .icon2]
    wm iconwindow .t .icon2
    lappend result [wm state .icon] [wm state .icon2]
    destroy .icon .icon2
    set result
} {icon normal withdrawn icon}
test unixWm-27.7 {Tk_WmCmd procedure, "iconwindow" option, withdrawing icon} unix {
    destroy .icon
    toplevel .icon -width 50 -height 50 -bg green
    wm geometry .icon +0+0
    update
    set result {}
    lappend result [wm state .icon] [winfo viewable .icon]
    wm iconwindow .t .icon
    lappend result [wm state .icon] [winfo viewable .icon]
    destroy .icon
    set result
} {normal 1 icon 0}

destroy .t
destroy .icon
toplevel .t -width 100 -height 50
wm geom .t +0+0
update

test unixWm-28.1 {Tk_WmCmd procedure, "maxsize" option, setting the
        maxsize should update WM_NORMAL_HINTS} {testwrapper} {
    destroy .t
    toplevel .t
    wm maxsize .t 300 300
    update
    set hints [testprop [testwrapper .t] WM_NORMAL_HINTS]
    format {%d %d} [lindex $hints 7] [lindex $hints 8]
} {300 300}

test unixWm-28.2 {Tk_WmCmd procedure, "maxsize" option, setting the
        maxsize to a value smaller than the current size should
        set the maxsize in WM_NORMAL_HINTS} {testwrapper} {
    destroy .t
    toplevel .t
    wm geom .t 400x400
    wm maxsize .t 300 300
    update
    set hints [testprop [testwrapper .t] WM_NORMAL_HINTS]
    format {%d %d} [lindex $hints 7] [lindex $hints 8]
} {300 300}

test unixWm-28.3 {Tk_WmCmd procedure, "maxsize" option, setting the
        maxsize to a value smaller than the current size should
        set the maxsize in WM_NORMAL_HINTS even if the
        interactive resizable flag is set to 0} {testwrapper} {
    destroy .t
    toplevel .t
    wm geom .t 400x400
    wm resizable .t 0 0
    wm maxsize .t 300 300
    update
    set hints [testprop [testwrapper .t] WM_NORMAL_HINTS]
    format {%d %d} [lindex $hints 7] [lindex $hints 8]
} {300 300}

test unixWm-29.1 {Tk_WmCmd procedure, "minsize" option, setting the
        minsize should update WM_NORMAL_HINTS} {testwrapper} {
    destroy .t
    toplevel .t
    wm minsize .t 300 300
    update
    set hints [testprop [testwrapper .t] WM_NORMAL_HINTS]
    format {%d %d} [lindex $hints 5] [lindex $hints 6]
} {300 300}

test unixWm-29.2 {Tk_WmCmd procedure, "minsize" option, setting the
        minsize to a value larger than the current size should
        set the maxsize in WM_NORMAL_HINTS} {testwrapper} {
    destroy .t
    toplevel .t
    wm geom .t 200x200
    wm minsize .t 300 300
    update
    set hints [testprop [testwrapper .t] WM_NORMAL_HINTS]
    format {%d %d} [lindex $hints 5] [lindex $hints 6]
} {300 300}

test unixWm-29.3 {Tk_WmCmd procedure, "minsize" option, setting the
        minsize to a value larger than the current size should
        set the minsize in WM_NORMAL_HINTS even if the
        interactive resizable flag is set to 0} {testwrapper} {
    destroy .t
    toplevel .t
    wm geom .t 200x200
    wm resizable .t 0 0
    wm minsize .t 300 300
    update
    set hints [testprop [testwrapper .t] WM_NORMAL_HINTS]
    format {%d %d} [lindex $hints 5] [lindex $hints 6]
} {300 300}

destroy .t .icon
toplevel .t -width 100 -height 50
wm geom .t +0+0
update

test unixWm-30.1 {Tk_WmCmd procedure, "overrideredirect" option} unix {
    list [catch {wm overrideredirect .t 1 2} msg]  $msg
} {1 {wrong # args: should be "wm overrideredirect window ?boolean?"}}
test unixWm-30.2 {Tk_WmCmd procedure, "overrideredirect" option} unix {
    list [catch {wm overrideredirect .t boo} msg]  $msg
} {1 {expected boolean value but got "boo"}}
test unixWm-30.3 {Tk_WmCmd procedure, "overrideredirect" option} unix {
    set result {}
    lappend result [wm overrideredirect .t]
    wm overrideredirect .t true
    lappend result [wm overrideredirect .t]
    wm overrideredirect .t off
    lappend result [wm overrideredirect .t]
} {0 1 0}

test unixWm-31.1 {Tk_WmCmd procedure, "positionfrom" option} unix {
    list [catch {wm positionfrom .t 1 2} msg]  $msg
} {1 {wrong # args: should be "wm positionfrom window ?user/program?"}}
test unixWm-31.2 {Tk_WmCmd procedure, "positionfrom" option} {unix testwrapper} {
    set result {}
    lappend result [wm positionfrom .t]
    wm positionfrom .t program
    update
    set bit [format 0x%x [expr 0x5 & [lindex [testprop [testwrapper .t] \
	    WM_NORMAL_HINTS] 0]]]
    lappend result [wm positionfrom .t] $bit
    wm positionfrom .t user
    update
    set bit [format 0x%x [expr 0x5 & [lindex [testprop [testwrapper .t] \
	    WM_NORMAL_HINTS] 0]]]
    lappend result [wm positionfrom .t] $bit
} {user program 0x4 user 0x1}
test unixWm-31.3 {Tk_WmCmd procedure, "positionfrom" option} unix {
    list [catch {wm positionfrom .t none} msg]  $msg
} {1 {bad argument "none": must be program or user}}

test unixWm-32.1 {Tk_WmCmd procedure, "protocol" option} unix {
    list [catch {wm protocol .t 1 2 3} msg]  $msg
} {1 {wrong # args: should be "wm protocol window ?name? ?command?"}}
test unixWm-32.2 {Tk_WmCmd procedure, "protocol" option} unix {
    wm protocol .t {foo a} {a b c}
    wm protocol .t bar {test script for bar}
    set result [wm protocol .t]
    wm protocol .t {foo a} {}
    wm protocol .t bar {}
    set result
} {bar {foo a}}
test unixWm-32.3 {Tk_WmCmd procedure, "protocol" option} {unix testwrapper} {
    set result {}
    lappend result [wm protocol .t]
    set x {}
    foreach i [testprop [testwrapper .t] WM_PROTOCOLS] {
	lappend x [winfo atomname $i]
    }
    lappend result $x
    wm protocol .t foo {test script}
    wm protocol .t bar {test script}
    set x {}
    foreach i [testprop [testwrapper .t] WM_PROTOCOLS] {
	lappend x [winfo atomname $i]
    }
    lappend result [wm protocol .t] $x
    wm protocol .t foo {}
    wm protocol .t bar {}
    set x {}
    foreach i [testprop [testwrapper .t] WM_PROTOCOLS] {
	lappend x [winfo atomname $i]
    }
    lappend result [wm protocol .t] $x
} {{} WM_DELETE_WINDOW {bar foo} {WM_DELETE_WINDOW bar foo} {} WM_DELETE_WINDOW}
test unixWm-32.4 {Tk_WmCmd procedure, "protocol" option} unix {
    set result {}
    wm protocol .t foo {a b c}
    wm protocol .t bar {test script for bar}
    lappend result [wm protocol .t foo] [wm protocol .t bar]
    wm protocol .t foo {}
    wm protocol .t bar {}
    lappend result [wm protocol .t foo] [wm protocol .t bar]
} {{a b c} {test script for bar} {} {}}
test unixWm-32.5 {Tk_WmCmd procedure, "protocol" option} unix {
    wm protocol .t foo {a b c}
    wm protocol .t foo {test script}
    set result [wm protocol .t foo]
    wm protocol .t foo {}
    set result
} {test script}

test unixWm-33.1 {Tk_WmCmd procedure, "resizable" option} unix {
    list [catch {wm resizable . a} msg]  $msg
} {1 {wrong # args: should be "wm resizable window ?width height?"}}
test unixWm-33.2 {Tk_WmCmd procedure, "resizable" option} unix {
    list [catch {wm resizable . a b c} msg]  $msg
} {1 {wrong # args: should be "wm resizable window ?width height?"}}
test unixWm-33.3 {Tk_WmCmd procedure, "resizable" option} unix {
    list [catch {wm resizable .foo a b c} msg]  $msg
} {1 {bad window path name ".foo"}}
test unixWm-33.4 {Tk_WmCmd procedure, "resizable" option} unix {
    list [catch {wm resizable . x 1} msg]  $msg
} {1 {expected boolean value but got "x"}}
test unixWm-33.5 {Tk_WmCmd procedure, "resizable" option} unix {
    list [catch {wm resizable . 0 gorp} msg]  $msg
} {1 {expected boolean value but got "gorp"}}
test unixWm-33.6 {Tk_WmCmd procedure, "resizable" option} unix {
    destroy .t2
    toplevel .t2 -width 200 -height 100
    wm geom .t2 +0+0
    set result ""
    lappend result [wm resizable .t2]
    wm resizable .t2 1 0
    lappend result [wm resizable .t2]
    wm resizable .t2 no off
    lappend result [wm resizable .t2]
    wm resizable .t2 false true
    lappend result [wm resizable .t2]
    destroy .t2
    set result
} {{1 1} {1 0} {0 0} {0 1}}

test unixWm-34.1 {Tk_WmCmd procedure, "sizefrom" option} unix {
    list [catch {wm sizefrom .t 1 2} msg]  $msg
} {1 {wrong # args: should be "wm sizefrom window ?user|program?"}}
test unixWm-34.2 {Tk_WmCmd procedure, "sizefrom" option} {unix testwrapper} {
    set result {}
    lappend result [wm sizefrom .t]
    wm sizefrom .t program
    update
    set bit [format 0x%x [expr 0xa & [lindex [testprop [testwrapper .t] \
	    WM_NORMAL_HINTS] 0]]]
    lappend result [wm sizefrom .t] $bit
    wm sizefrom .t user
    update
    set bit [format 0x%x [expr 0xa & [lindex [testprop [testwrapper .t] \
	    WM_NORMAL_HINTS] 0]]]
    lappend result [wm sizefrom .t] $bit
} {{} program 0x8 user 0x2}
test unixWm-34.3 {Tk_WmCmd procedure, "sizefrom" option} unix {
    list [catch {wm sizefrom .t none} msg]  $msg
} {1 {bad argument "none": must be program or user}}

test unixWm-35.1 {Tk_WmCmd procedure, "state" option} unix {
    list [catch {wm state .t 1} msg]  $msg
} {1 {bad argument "1": must be normal, iconic, or withdrawn}}
test unixWm-35.2 {Tk_WmCmd procedure, "state" option} unix {
    list [catch {wm state .t iconic 1} msg]  $msg
} {1 {wrong # args: should be "wm state window ?state?"}}
test unixWm-35.3 {Tk_WmCmd procedure, "state" option} unix {
    set result {}
    destroy .t2
    toplevel .t2 -width 120 -height 300
    wm geometry .t2 +0+0
    lappend result [wm state .t2]
    update
    lappend result [wm state .t2]
    wm withdraw .t2
    lappend result [wm state .t2]
    wm iconify .t2
    lappend result [wm state .t2]
    wm deiconify .t2
    lappend result [wm state .t2]
    destroy .t2
    set result
} {normal normal withdrawn iconic normal}
test unixWm-35.4 {Tk_WmCmd procedure, "state" option} unix {
    set result {}
    destroy .t2
    toplevel .t2 -width 120 -height 300
    wm geometry .t2 +0+0
    lappend result [wm state .t2]
    update
    lappend result [wm state .t2]
    wm state .t2 withdrawn
    lappend result [wm state .t2]
    wm state .t2 iconic
    lappend result [wm state .t2]
    wm state .t2 normal
    lappend result [wm state .t2]
    destroy .t2
    set result
} {normal normal withdrawn iconic normal}

test unixWm-36.1 {Tk_WmCmd procedure, "title" option} unix {
    list [catch {wm title .t 1 2} msg]  $msg
} {1 {wrong # args: should be "wm title window ?newTitle?"}}
test unixWm-36.2 {Tk_WmCmd procedure, "title" option} {unix testwrapper} {
    set result {}
    lappend result [wm title .t] [testprop [testwrapper .t] WM_NAME]
    wm title .t "Test window"
    set bit [format 0x%x [expr 0xa & [lindex [testprop [testwrapper .t] \
	    WM_NORMAL_HINTS] 0]]]
    lappend result [wm title .t] [testprop [testwrapper .t] WM_NAME]
} {t t {Test window} {Test window}}

test unixWm-37.3 {Tk_WmCmd procedure, "transient" option} {unix testwrapper} {
    set result {}
    destroy .t2
    toplevel .t2 -width 120 -height 300
    wm geometry .t2 +0+0
    update
    lappend result [wm transient .t2] \
	    [testprop [testwrapper .t2] WM_TRANSIENT_FOR]
    wm transient .t2 .t
    set transient [testprop [testwrapper .t2] WM_TRANSIENT_FOR]
    lappend result [wm transient .t2] [expr [testwrapper .t] - $transient]
    wm transient .t2 {}
    lappend result [wm transient .t2] \
	    [testprop [testwrapper .t2] WM_TRANSIENT_FOR]
    destroy .t2
    set result
} {{} {} .t 0 {} {}}
test unixWm-37.4 {TkWmDeadWindow, destroy on master should clear transient} {unix testwrapper} {
    destroy .t2
    toplevel .t2
    destroy .t3
    toplevel .t3
    wm transient .t2 .t3
    update
    destroy .t3
    update
    list [wm transient .t2] [testprop [testwrapper .t2] WM_TRANSIENT_FOR]
} {{} {}}
test unixWm-37.5 {Tk_WmCmd procedure, "transient" option, create master wrapper} {unix testwrapper} {
    destroy .t2
    destroy .t3
    toplevel .t2 -width 120 -height 300
    wm geometry .t2 +0+0
    toplevel .t3 -width 120 -height 300
    wm geometry .t2 +0+0
    set result [list [testwrapper .t2]]
    wm transient .t3 .t2
    lappend result [expr {[testwrapper .t2] == ""}]
    destroy .t2 .t3
    set result
} {{} 0}

test unixWm-38.1 {Tk_WmCmd procedure, "withdraw" option} unix {
    list [catch {wm withdraw .t 1} msg]  $msg
} {1 {wrong # args: should be "wm withdraw window"}}
test unixWm-38.2 {Tk_WmCmd procedure, "withdraw" option} unix {
    destroy .t2
    toplevel .t2 -width 120 -height 300
    wm geometry .t2 +0+0
    wm iconwindow .t .t2
    set result [list [catch {wm withdraw .t2} msg]  $msg]
    destroy .t2
    set result
} {1 {can't withdraw .t2: it is an icon for .t}}
test unixWm-38.3 {Tk_WmCmd procedure, "withdraw" option} unix {
    set result {}
    wm withdraw .t
    lappend result [wm state .t] [winfo ismapped .t]
    wm deiconify .t
    lappend result [wm state .t] [winfo ismapped .t]
} {withdrawn 0 normal 1}

test unixWm-39.1 {Tk_WmCmd procedure, miscellaneous} unix {
    list [catch {wm unknown .t} msg] $msg
} {1 {bad option "unknown": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, forget, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, manage, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}

destroy .t .icon

test unixWm-40.1 {Tk_SetGrid procedure, set grid dimensions before turning on grid} {unix nonPortable} {
    destroy .t
    toplevel .t
    wm geometry .t 30x10+0+0
    listbox .t.l -height 20 -width 20 -setgrid 1 
    pack .t.l -fill both -expand 1
    update
    wm geometry .t
} {30x10+0+0}
test unixWm-40.2 {Tk_SetGrid procedure, turning on grid when dimensions already set} unix {
    destroy .t
    toplevel .t
    wm geometry .t 200x100+0+0
    listbox .t.l -height 20 -width 20 
    pack .t.l -fill both -expand 1
    update
    .t.l configure -setgrid 1
    update
    wm geometry .t
} {20x20+0+0}

test unixWm-41.1 {ConfigureEvent procedure, internally generated size changes} unix {
    destroy .t
    toplevel .t -width 400 -height 150
    wm geometry .t +0+0
    tkwait visibility .t
    set result {}
    lappend result [winfo width .t] [winfo height .t]
    .t configure -width 200 -height 300
    sleep 500
    lappend result [winfo width .t] [winfo height .t]
} {400 150 200 300}
test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable testmenubar} {
    destroy .t
    toplevel .t -width 300 -height 200 -bd 2 -relief raised
    wm geom .t +0+0
    update
    set x [winfo rootx .t]
    set y [winfo rooty .t]
    frame .t.m -bd 2 -relief raised -height 20
    testmenubar window .t .t.m
    update
    set result {}
    bind .t <Configure> {
	if {"%W" == ".t"} {
	    lappend result "%W: %wx%h"
	}
    }
    bind .t.m <Configure> {lappend result "%W: %wx%h"}
    wm geometry .t 200x300
    update
    lappend result [expr [winfo rootx .t.m] - $x] \
	    [expr [winfo rooty .t.m] - $y] \
	    [winfo width .t.m] [winfo height .t.m] \
	    [expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y] \
	    [winfo width .t] [winfo height .t]
} {{.t.m: 200x20} {.t: 200x300} 0 0 200 20 0 20 200 300}
test unixWm-41.3 {ConfigureEvent procedure, synthesized Configure events} unix {
    destroy .t
    toplevel .t -width 400 -height 150
    wm geometry .t +0+0
    tkwait visibility .t
    set result {no event}
    bind .t <Configure> {set result "configured: %w %h"}
    wm geometry .t +10+20
    update
    set result
} {configured: 400 150}
test unixWm-41.4 {ConfigureEvent procedure, synthesized Configure events} unix {
    destroy .t
    toplevel .t -width 400 -height 150
    wm geometry .t +0+0
    tkwait visibility .t
    set result {no event}
    bind .t <Configure> {set result "configured: %w %h"}
    wm geometry .t 130x200
    update
    set result
} {configured: 130 200}

# No tests for ReparentEvent or ComputeReparentGeometry; I can't figure
# out how to exercise these procedures reliably.

test unixWm-42.1 {WrapperEventProc procedure, map and unmap events} unix {
    destroy .t
    toplevel .t -width 400 -height 150
    wm geometry .t +0+0
    tkwait visibility .t
    set result {}
    bind .t <Map> {set x "mapped"}
    bind .t <Unmap> {set x "unmapped"}
    set x {no event}
    wm iconify .t
    lappend result $x [winfo ismapped .t]
    set x {no event}
    wm deiconify .t
    lappend result $x [winfo ismapped .t]
} {unmapped 0 mapped 1}

test unixWm-43.1 {TopLevelReqProc procedure, embedded in same process} unix {
    destroy .t
    toplevel .t -width 200 -height 200
    wm geom .t +0+0
    frame .t.f -container 1 -bd 2 -relief raised
    place .t.f -x 20 -y 10
    tkwait visibility .t.f
    toplevel .t2 -use [winfo id .t.f] -width 30 -height 20 -bg blue
    tkwait visibility .t2
    set result {}
    .t2 configure -width 70 -height 120
    update
    lappend result [winfo reqwidth .t.f] [winfo reqheight .t.f]
    lappend result [winfo width .t2] [winfo height .t2]
    # destroy .t2
    set result
} {70 120 70 120}
test unixWm-43.2 {TopLevelReqProc procedure, resize causes window to move} \
	{unix nonPortable} {
    destroy .t
    toplevel .t -width 200 -height 200
    wm geom .t +0+0
    update
    wm geom .t -0-0
    update
    set x [winfo x .t]
    set y [winfo y .t]
    .t configure -width 300 -height 150
    update
    list [expr [winfo x .t] - $x] [expr [winfo y .t] - $y] \
	    [winfo width .t] [winfo height .t]
} {-100 50 300 150}

test unixWm-44.1 {UpdateGeometryInfo procedure, width/height computation} unix {
    destroy .t
    toplevel .t -width 100 -height 200
    wm geometry .t +30+40
    wm overrideredirect .t 1
    tkwait visibility .t
    .t configure  -width 180 -height 20
    update
    list [winfo width .t] [winfo height .t]
} {180 20}
test unixWm-44.2 {UpdateGeometryInfo procedure, width/height computation} unix {
    destroy .t
    toplevel .t -width 80 -height 60
    wm grid .t 5 4 10 12
    wm geometry .t +30+40
    wm overrideredirect .t 1
    tkwait visibility .t
    wm geometry .t 10x2
    update
    list [winfo width .t] [winfo height .t]
} {130 36}
test unixWm-44.3 {UpdateGeometryInfo procedure, width/height computation} unix {
    destroy .t
    toplevel .t -width 80 -height 60
    wm grid .t 5 4 10 12
    wm geometry .t +30+40
    wm overrideredirect .t 1
    tkwait visibility .t
    wm geometry .t 1x10
    update
    list [winfo width .t] [winfo height .t]
} {40 132}
test unixWm-44.4 {UpdateGeometryInfo procedure, width/height computation} unix {
    destroy .t
    toplevel .t -width 100 -height 200
    wm geometry .t +30+40
    wm overrideredirect .t 1
    tkwait visibility .t
    wm geometry .t 300x150
    update
    list [winfo width .t] [winfo height .t]
} {300 150}
test unixWm-44.5 {UpdateGeometryInfo procedure, negative width} unix {
    destroy .t
    toplevel .t -width 80 -height 60
    wm grid .t 18 7 10 12
    wm geometry .t +30+40
    wm overrideredirect .t 1
    tkwait visibility .t
    wm geometry .t 5x8
    update
    list [winfo width .t] [winfo height .t]
} {1 72}
test unixWm-44.6 {UpdateGeometryInfo procedure, negative height} unix {
    destroy .t
    toplevel .t -width 80 -height 60
    wm grid .t 18 7 10 12
    wm geometry .t +30+40
    wm overrideredirect .t 1
    tkwait visibility .t
    wm geometry .t 20x1
    update
    list [winfo width .t] [winfo height .t]
} {100 1}

destroy .t
toplevel .t -width 80 -height 60
test unixWm-44.7 {UpdateGeometryInfo procedure, computing position} unix {
    wm geometry .t +5-10
    wm overrideredirect .t 1
    tkwait visibility .t
    list [winfo x .t] [winfo y .t]
} [list 5 [expr [winfo screenheight .t] - 70]]

destroy .t
toplevel .t -width 80 -height 60
test unixWm-44.8 {UpdateGeometryInfo procedure, computing position} unix {
    wm geometry .t -30+2
    wm overrideredirect .t 1
    tkwait visibility .t
    list [winfo x .t] [winfo y .t]
} [list [expr [winfo screenwidth .t] - 110] 2]
destroy .t

test unixWm-44.9 {UpdateGeometryInfo procedure, updating fixed dimensions} {unix testwrapper} {
    destroy .t
    toplevel .t -width 80 -height 60
    wm resizable .t 0 0
    wm geometry .t +0+0
    tkwait visibility .t
    .t configure  -width 180 -height 20
    update
    set property [testprop [testwrapper .t] WM_NORMAL_HINTS]
    list [expr [lindex $property 5]] [expr [lindex $property 6]] \
	    [expr [lindex $property 7]] [expr [lindex $property 8]]
} {180 20 180 20}
test unixWm-44.10 {UpdateGeometryInfo procedure, menubar changing} testmenubar {
    destroy .t
    toplevel .t -width 80 -height 60
    wm resizable .t 0 0
    wm geometry .t +0+0
    tkwait visibility .t
    .t configure -width 180 -height 50
    frame .t.m -bd 2 -relief raised -width 100 -height 50
    testmenubar window .t .t.m
    update
    .t configure -height 70
    .t.m configure -height 30
    list [update] [destroy .t]
} {{} {}}

test unixWm-45.1 {UpdateSizeHints procedure, grid information} {unix testwrapper} {
    destroy .t
    toplevel .t -width 80 -height 60
    wm grid .t 6 10 10 5
    wm minsize .t 2 4
    wm maxsize .t 30 40
    wm geometry .t +0+0
    tkwait visibility .t
    set property [testprop [testwrapper .t] WM_NORMAL_HINTS]
    list [expr [lindex $property 5]] [expr [lindex $property 6]] \
	    [expr [lindex $property 7]] [expr [lindex $property 8]] \
	    [expr [lindex $property 9]] [expr [lindex $property 10]]
} {40 30 320 210 10 5}
test unixWm-45.2 {UpdateSizeHints procedure} {unix testwrapper} {
    destroy .t
    toplevel .t -width 80 -height 60
    wm minsize .t 30 40
    wm maxsize .t 200 500
    wm geometry .t +0+0
    tkwait visibility .t
    set property [testprop [testwrapper .t] WM_NORMAL_HINTS]
    list [expr [lindex $property 5]] [expr [lindex $property 6]] \
	    [expr [lindex $property 7]] [expr [lindex $property 8]] \
	    [expr [lindex $property 9]] [expr [lindex $property 10]]
} {30 40 200 500 1 1}
test unixWm-45.3 {UpdateSizeHints procedure, grid with menu} {testmenubar testwrapper} {
    destroy .t
    toplevel .t -width 80 -height 60
    frame .t.menu -height 23 -width 50
    testmenubar window .t .t.menu
    wm grid .t 6 10 10 5
    wm minsize .t 2 4
    wm maxsize .t 30 40
    wm geometry .t +0+0
    tkwait visibility .t
    set property [testprop [testwrapper .t] WM_NORMAL_HINTS]
    list [winfo height .t] \
	    [expr [lindex $property 5]] [expr [lindex $property 6]] \
	    [expr [lindex $property 7]] [expr [lindex $property 8]] \
	    [expr [lindex $property 9]] [expr [lindex $property 10]]
} {60 40 53 320 233 10 5}
test unixWm-45.4 {UpdateSizeHints procedure, not resizable with menu} {testmenubar testwrapper} {
    destroy .t
    toplevel .t -width 80 -height 60
    frame .t.menu -height 23 -width 50
    testmenubar window .t .t.menu
    wm resizable .t 0 0
    wm geometry .t +0+0
    tkwait visibility .t
    set property [testprop [testwrapper .t] WM_NORMAL_HINTS]
    list [winfo height .t] \
	    [expr [lindex $property 5]] [expr [lindex $property 6]] \
	    [expr [lindex $property 7]] [expr [lindex $property 8]] \
	    [expr [lindex $property 9]] [expr [lindex $property 10]]
} {60 80 83 80 83 1 1}

# I don't know how to test WaitForConfigureNotify.

test unixWm-46.1 {WaitForEvent procedure, use of modal timeout} unix {
    destroy .t
    toplevel .t -width 200 -height 200
    wm geom .t +0+0
    update
    wm iconify .t
    set x no
    after 0 {set x yes}
    wm deiconify .t
    set result $x
    update
    list $result $x
} {no yes}

test unixWm-47.1 {WaitRestrictProc procedure} {unix nonPortable} {
    destroy .t
    toplevel .t -width 300 -height 200
    frame .t.f -bd 2 -relief raised
    place .t.f -x 20 -y 30 -width 100 -height 20
    wm geometry .t +0+0
    tkwait visibility .t
    set result {}
    bind .t.f <Configure> {lappend result {configure on .t.f}}
    bind .t <Map> {lappend result {map on .t}}
    bind .t <Unmap> {lappend result {unmap on .t}; bind .t <Unmap> {}}
    bind .t <Button> {lappend result {button %b on .t}}
    event generate .t.f <Configure> -when tail
    event generate .t <Configure> -when tail
    event generate .t <Button> -button 3 -when tail
    event generate .t <ButtonRelease> -button 3 -when tail
    event generate .t <Map> -when tail
    lappend result iconify
    wm iconify .t
    lappend result done
    update
    set result
} {iconify {unmap on .t} done {configure on .t.f} {button 3 on .t} {map on .t}}

# I don't know how to test WaitTimeoutProc, WaitForMapNotify, or UpdateHints.

destroy .t
toplevel .t -width 300 -height 200
wm geometry .t +0+0
tkwait visibility .t

test unixWm-48.1 {ParseGeometry procedure} unix {
    wm geometry .t =100x120
    update
    list [winfo width .t] [winfo height .t]
} {100 120}
test unixWm-48.2 {ParseGeometry procedure} unix {
    list [catch {wm geometry .t =10zx120} msg] $msg
} {1 {bad geometry specifier "=10zx120"}}
test unixWm-48.3 {ParseGeometry procedure} unix {
    list [catch {wm geometry .t x120} msg] $msg
} {1 {bad geometry specifier "x120"}}
test unixWm-48.4 {ParseGeometry procedure} unix {
    list [catch {wm geometry .t =100x120a} msg] $msg
} {1 {bad geometry specifier "=100x120a"}}
test unixWm-48.5 {ParseGeometry procedure} unix {
    list [catch {wm geometry .t z} msg] $msg
} {1 {bad geometry specifier "z"}}
test unixWm-48.6 {ParseGeometry procedure} unix {
    list [catch {wm geometry .t +20&} msg] $msg
} {1 {bad geometry specifier "+20&"}}
test unixWm-48.7 {ParseGeometry procedure} unix {
    list [catch {wm geometry .t +-} msg] $msg
} {1 {bad geometry specifier "+-"}}
test unixWm-48.8 {ParseGeometry procedure} unix {
    list [catch {wm geometry .t +20a} msg] $msg
} {1 {bad geometry specifier "+20a"}}
test unixWm-48.9 {ParseGeometry procedure} unix {
    list [catch {wm geometry .t +20-} msg] $msg
} {1 {bad geometry specifier "+20-"}}
test unixWm-48.10 {ParseGeometry procedure} unix {
    list [catch {wm geometry .t +20+10z} msg] $msg
} {1 {bad geometry specifier "+20+10z"}}
test unixWm-48.11 {ParseGeometry procedure} unix {
    catch {wm geometry .t +-10+20}
} {0}
test unixWm-48.12 {ParseGeometry procedure} unix {
    catch {wm geometry .t +30+-10}
} {0}
test unixWm-48.13 {ParseGeometry procedure, resize causes window to move} unix {
    destroy .t
    toplevel .t -width 200 -height 200
    wm geom .t +0+0
    update
    wm geom .t -0-0
    update
    set x [winfo x .t]
    set y [winfo y .t]
    wm geometry .t 150x300
    update
    list [expr [winfo x .t] - $x] [expr [winfo y .t] - $y] \
	    [winfo width .t] [winfo height .t]
} {50 -100 150 300}

test unixWm-49.1 {Tk_GetRootCoords procedure} unix {
    destroy .t
    toplevel .t -width 300 -height 200
    frame .t.f -width 150 -height 100 -bd 2 -relief raised
    place .t.f -x 150 -y 120
    frame .t.f.f -width 20 -height 20 -bd 2 -relief raised
    place .t.f.f -x 10 -y 20
    wm overrideredirect .t 1
    wm geometry .t +40+50
    tkwait visibility .t
    list [winfo rootx .t.f.f] [winfo rooty .t.f.f]
} {202 192}
test unixWm-49.2 {Tk_GetRootCoords procedure, menubars} {unix testmenubar} {
    destroy .t
    toplevel .t -width 300 -height 200 -bd 2 -relief raised
    wm geom .t +0+0
    update
    set x [winfo rootx .t]
    set y [winfo rooty .t]
    frame .t.m -bd 2 -relief raised -width 100 -height 30
    frame .t.m.f -width 20 -height 10 -bd 2 -relief raised
    place .t.m.f -x 50 -y 5
    frame .t.f -width 20 -height 30 -bd 2 -relief raised
    place .t.f -x 10 -y 30
    testmenubar window .t .t.m
    update
    list [expr [winfo rootx .t.m.f] - $x] [expr [winfo rooty .t.m.f] - $y] \
	    [expr [winfo rootx .t.f] - $x] [expr [winfo rooty .t.f] - $y] 
} {52 7 12 62}

deleteWindows
wm iconify .
test unixWm-50.1 {Tk_CoordsToWindow procedure, finding a toplevel, x-coords} unix {
    deleteWindows
    toplevel .t -width 300 -height 400 -bg green
    wm geom .t +40+0
    tkwait visibility .t
    toplevel .t2 -width 100 -height 80 -bg red
    wm geom .t2 +140+200
    tkwait visibility .t2
    raise .t2
    set x [winfo rootx .t]
    set y [winfo rooty .t]
    list [winfo containing [expr $x - 30] [expr $y + 250]] \
	    [winfo containing [expr $x - 1] [expr $y + 250]] \
	    [winfo containing $x [expr $y + 250]] \
	    [winfo containing [expr $x + 99] [expr $y + 250]] \
	    [winfo containing [expr $x + 100] [expr $y + 250]] \
	    [winfo containing [expr $x + 199] [expr $y + 250]] \
	    [winfo containing [expr $x + 200] [expr $y + 250]] \
	    [winfo containing [expr $x + 220] [expr $y + 250]]
} {{} {} .t {} .t2 .t2 {} .t}
test unixWm-50.2 {Tk_CoordsToWindow procedure, finding a toplevel, y-coords and overrideredirect} unix {
    deleteWindows
    toplevel .t -width 300 -height 400 -bg yellow
    wm geom .t +0+50
    tkwait visibility .t
    toplevel .t2 -width 100 -height 80 -bg blue
    wm overrideredirect .t2 1
    wm geom .t2 +100+200
    tkwait visibility .t2
    raise .t2
    set x [winfo rootx .t]
    set y [winfo rooty .t]
    set y2 [winfo rooty .t2]
    list [winfo containing [expr $x +150] 10] \
	    [winfo containing [expr $x +150] [expr $y - 1]] \
	    [winfo containing [expr $x +150] $y] \
	    [winfo containing [expr $x +150] [expr $y2 - 1]] \
	    [winfo containing [expr $x +150] $y2] \
	    [winfo containing [expr $x +150] [expr $y2 + 79]] \
	    [winfo containing [expr $x +150] [expr $y2 + 80]] \
	    [winfo containing [expr $x +150] [expr $y + 450]]
} {{} {} .t .t .t2 .t2 .t {}}
test unixWm-50.3 {
	Tk_CoordsToWindow procedure, finding a toplevel with embedding
} -constraints tempNotWin -setup {
    deleteWindows
    toplevel .t -width 300 -height 400 -bg blue
    wm geom .t +0+50
    frame .t.f -container 1
    place .t.f -x 150 -y 50
    tkwait visibility .t.f
    setupbg
} -body {
    dobg "
	wm withdraw .
	toplevel .x -width 100 -height 80 -use [winfo id .t.f] -bg yellow
	tkwait visibility .x"
    set result [dobg {
	set x [winfo rootx .x]
	set y [winfo rooty .x]
	list [winfo containing [expr $x - 1] [expr $y + 50]] \
		[winfo containing $x [expr $y +50]]
    }]
    set x [winfo rootx .t]
    set y [winfo rooty .t]
    lappend result [winfo containing [expr $x + 200] [expr $y + 49]] \
		[winfo containing [expr $x + 200] [expr $y +50]]
} -cleanup {
    cleanupbg
} -result {{} .x .t .t.f}
test unixWm-50.4 {Tk_CoordsToWindow procedure, window in other application} unix {
    destroy .t
    catch {interp delete slave}
    toplevel .t -width 200 -height 200 -bg green
    wm geometry .t +0+0
    tkwait visibility .t
    interp create slave
    load {} Tk slave
    slave eval {wm geometry . 200x200+0+0; tkwait visibility .}
    set result [list [winfo containing 100 100] \
	    [slave eval {winfo containing 100 100}]]
    interp delete slave
    set result
} {{} .}
test unixWm-50.5 {Tk_CoordsToWindow procedure, handling menubars} {unix testmenubar} {
    deleteWindows
    toplevel .t -width 300 -height 400 -bd 2 -relief raised
    frame .t.f -width 150 -height 120 -bg green
    place .t.f -x 10 -y 150
    wm geom .t +0+50
    frame .t.menu -width 100 -height 30 -bd 2 -relief raised
    frame .t.menu.f -width 40 -height 20 -bg purple
    place .t.menu.f -x 30 -y 10
    testmenubar window .t .t.menu
    tkwait visibility .t.menu
    update
    set x [winfo rootx .t]
    set y [winfo rooty .t]
    list [winfo containing $x [expr $y - 31]] \
		[winfo containing $x [expr $y - 30]] \
		[winfo containing [expr $x + 50] [expr $y - 19]] \
		[winfo containing [expr $x + 50] [expr $y - 18]] \
		[winfo containing [expr $x + 50] $y] \
		[winfo containing [expr $x + 11] [expr $y + 152]] \
		[winfo containing [expr $x + 12] [expr $y + 152]]
} {{} .t.menu .t.menu .t.menu.f .t .t .t.f}
test unixWm-50.6 {Tk_CoordsToWindow procedure, embedding within one app.} unix {
    deleteWindows
    toplevel .t -width 300 -height 400 -bg orange
    wm geom .t +0+50
    frame .t.f -container 1
    place .t.f -x 150 -y 50
    tkwait visibility .t.f
    toplevel .t2 -width 100 -height 80 -bg green -use [winfo id .t.f]
    tkwait visibility .t2
    update
    set x [winfo rootx .t]
    set y [winfo rooty .t]
    list [winfo containing [expr $x +149] [expr $y + 80]] \
	    [winfo containing [expr $x +150] [expr $y +80]] \
	    [winfo containing [expr $x +249] [expr $y +80]] \
	    [winfo containing [expr $x +250] [expr $y +80]]
} {.t .t2 .t2 .t}
test unixWm-50.7 {Tk_CoordsToWindow procedure, more basics} unix {
    destroy .t
    toplevel .t -width 300 -height 400 -bg green
    wm geom .t +0+0
    frame .t.f -width 100 -height 200 -bd 2 -relief raised
    place .t.f -x 100 -y 100
    frame .t.f.f -width 100 -height 200 -bd 2 -relief raised
    place .t.f.f -x 0 -y 100
    tkwait visibility .t.f.f
    set x [expr [winfo rootx .t] + 150]
    set y [winfo rooty .t]
    list [winfo containing $x [expr $y + 50]] \
	    [winfo containing $x [expr $y + 150]] \
	    [winfo containing $x [expr $y + 250]] \
	    [winfo containing $x [expr $y + 350]] \
	    [winfo containing $x [expr $y + 450]]
} {.t .t.f .t.f.f .t {}}
test unixWm-50.8 {Tk_CoordsToWindow procedure, more basics} unix {
    destroy .t
    toplevel .t -width 400 -height 300 -bg green
    wm geom .t +0+0
    frame .t.f -width 200 -height 100 -bd 2 -relief raised
    place .t.f -x 100 -y 100
    frame .t.f.f -width 200 -height 100 -bd 2 -relief raised
    place .t.f.f -x 100 -y 0
    update
    set x [winfo rooty .t]
    set y [expr [winfo rooty .t] + 150]
    list [winfo containing [expr $x + 50] $y] \
	    [winfo containing [expr $x + 150] $y] \
	    [winfo containing [expr $x + 250] $y] \
	    [winfo containing [expr $x + 350] $y] \
	    [winfo containing [expr $x + 450] $y]
} {.t .t.f .t.f.f .t {}}
test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} unix {
    destroy .t
    destroy .t2
    sleep 500		;# Give window manager time to catch up.
    toplevel .t -width 200 -height 200 -bg green
    wm geometry .t +0+0
    tkwait visibility .t
    toplevel .t2 -width 200 -height 200 -bg red
    wm geometry .t2 +0+0
    tkwait visibility .t2
    set result [list [winfo containing 100 100]]
    wm iconify .t2
    lappend result [winfo containing 100 100]
} {.t2 .t}
test unixWm-50.10 {Tk_CoordsToWindow procedure, unmapped windows} unix {
    destroy .t
    toplevel .t -width 200 -height 200 -bg green
    wm geometry .t +0+0
    frame .t.f -width 150 -height 150 -bd 2 -relief raised
    place .t.f -x 25 -y 25
    tkwait visibility .t.f
    set result [list [winfo containing 100 100]]
    place forget .t.f
    update
    lappend result [winfo containing 100 100]
} {.t.f .t}
deleteWindows
wm deiconify .

# No tests for UpdateVRootGeometry, Tk_GetVRootGeometry,
# Tk_MoveToplevelWindow, UpdateWmProtocols, or TkWmProtocolEventProc.

test unixWm-51.1 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} {
    makeToplevels
    update
    raise .raise1
    winfo containing [winfo rootx .raise1] [winfo rooty .raise1]
} .raise1
test unixWm-51.2 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} {
    makeToplevels
    update
    raise .raise2
    winfo containing [winfo rootx .raise1] [winfo rooty .raise1]
} .raise2
test unixWm-51.3 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} {
    makeToplevels
    update
    raise .raise3
    raise .raise2
    raise .raise1 .raise3
    set result [winfo containing [winfo rootx .raise1] \
	    [winfo rooty .raise1]]
    destroy .raise2
    sleep 500
    list $result [winfo containing [winfo rootx .raise1] \
	    [winfo rooty .raise1]]
} {.raise2 .raise1}
test unixWm-51.4 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} {
    makeToplevels
    raise .raise2
    raise .raise1
    lower .raise3 .raise1
    set result [winfo containing 100 100]
    destroy .raise1
    sleep 500
    lappend result [winfo containing 100 100]
} {.raise1 .raise3}
test unixWm-51.5 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} {
    makeToplevels
    update
    raise .raise2
    raise .raise1
    raise .raise3
    frame .raise1.f1
    frame .raise1.f1.f2
    lower .raise3 .raise1.f1.f2
    set result [winfo containing [winfo rootx .raise1] \
	    [winfo rooty .raise1]]
    destroy .raise1
    sleep 500
    list $result [winfo containing [winfo rootx .raise2] \
	    [winfo rooty .raise2]]
} {.raise1 .raise3}
deleteWindows
test unixWm-51.6 {TkWmRestackToplevel procedure, window to be stacked isn't mapped} unix {
    destroy .t
    toplevel .t -width 200 -height 200 -bg green
    wm geometry .t +0+0
    tkwait visibility .t
    destroy .t2
    toplevel .t2 -width 200 -height 200 -bg red
    wm geometry .t2 +0+0
    winfo containing 100 100
} {.t}
test unixWm-51.7 {TkWmRestackToplevel procedure, other window isn't mapped} unix {
    foreach w {.t .t2 .t3} {
	destroy $w
	toplevel $w -width 200 -height 200 -bg green
	wm geometry $w +0+0
    }
    raise .t .t2
    sleep 2000
    update
    set result [list [winfo containing 100 100]]
    lower .t3
    sleep 2000
    lappend result [winfo containing 100 100]
} {.t3 .t}
test unixWm-51.8 {TkWmRestackToplevel procedure, overrideredirect windows} unix {
    destroy .t
    toplevel .t -width 200 -height 200 -bg green
    wm overrideredirect .t 1
    wm geometry .t +0+0
    tkwait visibility .t
    destroy .t2
    toplevel .t2 -width 200 -height 200 -bg red
    wm overrideredirect .t2 1
    wm geometry .t2 +0+0
    tkwait visibility .t2

    # Need to use vrootx and vrooty to make tests work correctly with
    # virtual root window measures managers: overrideredirect windows
    # come up at (0,0) in display coordinates, not virtual root
    # coordinates.

    set x [expr 100-[winfo vrootx .]]
    set y [expr 100-[winfo vrooty .]]
    set result [list [winfo containing $x $y]]
    raise .t
    lappend result [winfo containing $x $y]
    raise .t2
    lappend result [winfo containing $x $y]
} {.t2 .t .t2}
test unixWm-51.9 {TkWmRestackToplevel procedure, other window overrideredirect} unix {
    foreach w {.t .t2 .t3} {
	destroy $w
	toplevel $w -width 200 -height 200 -bg green
	wm overrideredirect $w 1
	wm geometry $w +0+0
	tkwait visibility $w
    }
    lower .t3 .t2
    update

    # Need to use vrootx and vrooty to make tests work correctly with
    # virtual root window measures managers: overrideredirect windows
    # come up at (0,0) in display coordinates, not virtual root
    # coordinates.

    set x [expr 100-[winfo vrootx .]]
    set y [expr 100-[winfo vrooty .]]
    set result [list [winfo containing $x $y]]
    lower .t2
    lappend result [winfo containing $x $y]
} {.t2 .t3}
test unixWm-51.10 {TkWmRestackToplevel procedure, don't move window that's already in the right place} unix {
    makeToplevels
    raise .raise1
    set time [lindex [time {raise .raise1}] 0]
    expr {$time < 2000000}
} 1
test unixWm-51.11 {TkWmRestackToplevel procedure, don't move window that's already in the right place} unix {
    makeToplevels
    set time [lindex [time {lower .raise1}] 0]
    expr {$time < 2000000}
} 1
test unixWm-51.12 {TkWmRestackToplevel procedure, don't move window that's already in the right place} unix {
    makeToplevels
    set time [lindex [time {raise .raise3 .raise2}] 0]
    expr {$time < 2000000}
} 1
test unixWm-51.13 {TkWmRestackToplevel procedure, don't move window that's already in the right place} unix {
    makeToplevels
    set time [lindex [time {lower .raise1 .raise2}] 0]
    expr {$time < 2000000}
} 1

test unixWm-52.1 {TkWmAddToColormapWindows procedure} unix {
    destroy .t
    toplevel .t -width 200 -height 200 -colormap new -relief raised -bd 2
    wm geom .t +0+0
    update
    wm colormap .t
} {}
test unixWm-52.2 {TkWmAddToColormapWindows procedure} unix {
    destroy .t
    toplevel .t -colormap new -relief raised -bd 2
    wm geom .t +0+0
    frame .t.f -width 100 -height 100 -colormap new -relief sunken -bd 2
    pack .t.f
    update
    wm colormap .t
} {.t.f .t}
test unixWm-52.3 {TkWmAddToColormapWindows procedure} unix {
    destroy .t
    toplevel .t -colormap new
    wm geom .t +0+0
    frame .t.f -width 100 -height 100 -colormap new -relief sunken -bd 2
    pack .t.f
    frame .t.f2 -width 100 -height 100 -colormap new -relief sunken -bd 2
    pack .t.f2
    update
    wm colormap .t
} {.t.f .t.f2 .t}
test unixWm-52.4 {TkWmAddToColormapWindows procedure} unix {
    destroy .t
    toplevel .t -colormap new
    wm geom .t +0+0
    frame .t.f -width 100 -height 100 -colormap new -relief sunken -bd 2
    pack .t.f
    update
    wm colormapwindows .t .t.f
    frame .t.f2 -width 100 -height 100 -colormap new -relief sunken -bd 2
    pack .t.f2
    update
    wm colormapwindows .t
} {.t.f}

test unixWm-53.1 {TkWmRemoveFromColormapWindows procedure} unix {
    destroy .t
    toplevel .t -colormap new
    wm geom .t +0+0
    frame .t.f -width 100 -height 100 -colormap new -relief sunken -bd 2
    pack .t.f
    frame .t.f2 -width 100 -height 100 -colormap new -relief sunken -bd 2
    pack .t.f2
    update
    destroy .t.f2
    wm colormap .t
} {.t.f .t}
test unixWm-53.2 {TkWmRemoveFromColormapWindows procedure} unix {
    destroy .t
    toplevel .t -colormap new
    wm geom .t +0+0
    frame .t.f -width 100 -height 100 -colormap new -relief sunken -bd 2
    pack .t.f
    frame .t.f2 -width 100 -height 100 -colormap new -relief sunken -bd 2
    pack .t.f2
    update
    wm colormapwindows .t .t.f2
    destroy .t.f2
    wm colormap .t
} {}

test unixWm-54.1 {TkpMakeMenuWindow procedure, setting save_under} {unix nonUnixUserInteraction} {
    destroy .t
    destroy .m
    toplevel .t -width 300 -height 200 -bd 2 -relief raised
    bind .t <Expose> {set x exposed}
    wm geom .t +0+0
    update
    menu .m
    .m add command -label First
    .m add command -label Second
    .m add command -label Third
    .m post 30 30
    update
    set x {no event}
    destroy .m
    set x
} {no event}
test unixWm-54.2 {TkpMakeMenuWindow procedure, setting override_redirect} {unix nonUnixUserInteraction} {
    destroy .m
    menu .m
    .m add command -label First
    .m add command -label Second
    .m add command -label Third
    .m post 30 30
    update
    set result [wm overrideredirect .m]
    destroy .m
    set result
} {1}

# No tests for TkGetPointerCoords, CreateWrapper, or GetMaxSize.

test unixWm-55.1 {TkUnixSetMenubar procedure} {unix testmenubar} {
    destroy .t
    toplevel .t -width 300 -height 200 -bd 2 -relief raised
    wm geom .t +0+0
    update
    frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green
    testmenubar window .t .t.f
    update
    list [winfo ismapped .t.f] [winfo geometry .t.f] \
	    [expr [winfo rootx .t] - [winfo rootx .t.f]] \
	    [expr [winfo rooty .t] - [winfo rooty .t.f]]
} {1 300x30+0+0 0 30}
test unixWm-55.2 {TkUnixSetMenubar procedure, removing menubar} {unix testmenubar} {
    destroy .t
    destroy .f
    toplevel .t -width 300 -height 200 -bd 2 -relief raised
    wm geom .t +0+0
    update
    set x [winfo rootx .t]
    set y [winfo rooty .t]
    frame .f -width 400 -height 30 -bd 2 -relief raised -bg green
    testmenubar window .t .f
    update
    testmenubar window .t {}
    update
    list [winfo ismapped .f] [winfo geometry .f] \
	    [expr [winfo rootx .t] - $x] \
	    [expr [winfo rooty .t] - $y] \
	    [expr [winfo rootx .] - [winfo rootx .f]] \
	    [expr [winfo rooty .] - [winfo rooty .f]]
} {0 300x30+0+0 0 0 0 0}
test unixWm-55.3 {TkUnixSetMenubar procedure, removing geometry manager} {unix testmenubar} {
    destroy .t
    toplevel .t -width 300 -height 200 -bd 2 -relief raised
    wm geom .t +0+0
    update
    set x [winfo rootx .t]
    set y [winfo rooty .t]
    frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green
    testmenubar window .t .t.f
    update
    testmenubar window .t {}
    update
    set result "[expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y]"
    .t.f configure -height 100
    update
    lappend result [expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y]
} {0 0 0 0}
test unixWm-55.4 {TkUnixSetMenubar procedure, toplevel not yet created} {unix testmenubar} {
    destroy .t
    toplevel .t -width 300 -height 200 -bd 2 -relief raised
    frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green
    testmenubar window .t .t.f
    wm geom .t +0+0
    update
    list [winfo ismapped .t.f] [winfo geometry .t.f] \
	    [expr [winfo rootx .t] - [winfo rootx .t.f]] \
	    [expr [winfo rooty .t] - [winfo rooty .t.f]]
} {1 300x30+0+0 0 30}
test unixWm-55.5 {TkUnixSetMenubar procedure, changing menubar} {unix testmenubar} {
    destroy .t
    destroy .f
    toplevel .t -width 300 -height 200 -bd 2 -relief raised
    frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green
    wm geom .t +0+0
    update
    set y [winfo rooty .t]
    frame .f -width 400 -height 50 -bd 2 -relief raised -bg green
    testmenubar window .t .t.f
    update
    set result {}
    lappend result [winfo ismapped .f] [winfo ismapped .t.f]
    lappend result [expr [winfo rooty .t.f] - $y]
    testmenubar window .t .f
    update
    lappend result [winfo ismapped .f] [winfo ismapped .t.f]
    lappend result [expr [winfo rooty .f] - $y]
} {0 1 0 1 0 0}
test unixWm-55.6 {TkUnixSetMenubar procedure, changing menubar to self} {unix testmenubar} {
    destroy .t
    toplevel .t -width 300 -height 200 -bd 2 -relief raised
    frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green
    testmenubar window .t .t.f
    wm geom .t +0+0
    update
    testmenubar window .t .t.f
    update
    list [winfo ismapped .t.f] [winfo geometry .t.f] \
	    [expr [winfo rootx .t] - [winfo rootx .t.f]] \
	    [expr [winfo rooty .t] - [winfo rooty .t.f]]
} {1 300x30+0+0 0 30}
test unixWm-55.7 {TkUnixSetMenubar procedure, unsetting event handler} {unix testmenubar} {
    destroy .t
    destroy .f
    toplevel .t -width 300 -height 200 -bd 2 -relief raised
    frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green
    frame .f -width 400 -height 40 -bd 2 -relief raised -bg blue
    wm geom .t +0+0
    update
    set y [winfo rooty .t]
    testmenubar window .t .t.f
    update
    set result [expr [winfo rooty .t] - $y]
    testmenubar window .t .f
    update
    lappend result [expr [winfo rooty .t] - $y]
    destroy .t.f
    update
    lappend result [expr [winfo rooty .t] - $y]
} {30 40 40}

test unixWm-56.1 {MenubarDestroyProc procedure} {unix testmenubar} {
    destroy .t
    toplevel .t -width 300 -height 200 -bd 2 -relief raised
    wm geom .t +0+0
    update
    set y [winfo rooty .t]
    frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green
    testmenubar window .t .t.f
    update
    set result [expr [winfo rooty .t] - $y]
    destroy .t.f
    update
    lappend result [expr [winfo rooty .t] - $y]
} {30 0}

test unixWm-57.1 {MenubarReqProc procedure} {unix testmenubar} {
    destroy .t
    toplevel .t -width 300 -height 200 -bd 2 -relief raised
    wm geom .t +0+0
    update
    set x [winfo rootx .t]
    set y [winfo rooty .t]
    frame .t.f -width 400 -height 10 -bd 2 -relief raised -bg green
    testmenubar window .t .t.f
    update
    set result "[expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y]"
    .t.f configure -height 100
    update
    lappend result [expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y]
} {0 10 0 100}
test unixWm-57.2 {MenubarReqProc procedure} {unix testmenubar} {
    destroy .t
    toplevel .t -width 300 -height 200 -bd 2 -relief raised
    wm geom .t +0+0
    update
    set x [winfo rootx .t]
    set y [winfo rooty .t]
    frame .t.f -width 400 -height 20 -bd 2 -relief raised -bg green
    testmenubar window .t .t.f
    update
    set result "[expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y]"
    .t.f configure -height 0
    update
    lappend result [expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y]
} {0 20 0 1}

test unixWm-58.1 {UpdateCommand procedure, DString gets reallocated} {unix testwrapper} {
    destroy .t
    toplevel .t -width 100 -height 50
    wm geom .t +0+0
    wm command .t "argumentNumber0 argumentNumber1 argumentNumber2 argumentNumber0 argumentNumber3 argumentNumber4 argumentNumber5 argumentNumber6 argumentNumber0 argumentNumber7 argumentNumber8 argumentNumber9 argumentNumber10 argumentNumber0 argumentNumber11 argumentNumber12 argumentNumber13 argumentNumber14 argumentNumber15 argumentNumber16 argumentNumber17 argumentNumber18"
    update
    testprop [testwrapper .t] WM_COMMAND
} {argumentNumber0
argumentNumber1
argumentNumber2
argumentNumber0
argumentNumber3
argumentNumber4
argumentNumber5
argumentNumber6
argumentNumber0
argumentNumber7
argumentNumber8
argumentNumber9
argumentNumber10
argumentNumber0
argumentNumber11
argumentNumber12
argumentNumber13
argumentNumber14
argumentNumber15
argumentNumber16
argumentNumber17
argumentNumber18
}

# Test exit processing and cleanup:

test unixWm-59.1 {exit processing} unix {
    set script [makeFile {
	update
	exit
    } script]
    if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} {
	set error 1
    } else {
	set error 0
    }
    removeFile script
    list $error $msg
} {0 {}}
test unixWm-59.2 {exit processing} unix {
    set code [loadTkCommand]
    append code  {
	interp create x
	x eval {set argc 2}
	x eval {set argv "-geometry 10x10+0+0"}
	x eval {load {} Tk}
	update
	exit
    }
    set script [makeFile $code script]
    if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} {
	set error 1
    } else {
	set error 0
    }
    removeFile script
    list $error $msg
} {0 {}}
test unixWm-59.3 {exit processing} unix {
    set code [loadTkCommand]
    append code  {
	interp create x
	x eval {set argc 2}
	x eval {set argv "-geometry 10x10+0+0"}
	x eval {load {} Tk}
	x eval {
	    button .b -text hello
	    bind .b <Destroy> foo
	}
	x alias foo destroy_x
	proc destroy_x {} {interp delete x}
	update
	exit
    }
    set script [makeFile $code script]
    if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} {
	set error 1
    } else {
	set error 0
    }
    removeFile script
    list $error $msg
} {0 {}}

#
# wm attributes tests:
#
# NOTE: since [wm attributes] is not guaranteed to have any effect,
# the only thing we can really test here is the syntax.
#
test unixWm-60.1 {wm attributes - test} -constraints unix -body {
    destroy .t
    toplevel .t
    wm attributes .t
} -result [list -alpha 1.0 -topmost 0 -zoomed 0 -fullscreen 0 -type {}]

test unixWm-60.2 {wm attributes - test} -constraints unix -body {
    destroy .t
    toplevel .t
    wm attributes .t -topmost
} -result 0

test unixWm-60.3 {wm attributes - set (unrealized)} -constraints unix -body {
    destroy .t
    toplevel .t
    wm attributes .t -topmost 1
}

test unixWm-60.4 {wm attributes - set (realized)} -constraints unix -body {
    destroy .t
    toplevel .t
    tkwait visibility .t
    wm attributes .t -topmost 1
}

test unixWm-60.5 {wm attributes - bad attribute} -constraints unix -body {
    destroy .t
    toplevel .t
    wm attributes .t -foo
} -returnCodes 1 -match glob -result {bad attribute "-foo":*}

test unixWm-61.1 {Tk_WmCmd procedure, "iconphoto" option} unix {
    list [catch {wm iconph .} msg] $msg
} {1 {wrong # args: should be "wm iconphoto window ?-default? image1 ?image2 ...?"}}
test unixWm-61.2 {Tk_WmCmd procedure, "iconphoto" option} unix {
    destroy .t
    toplevel .t
    image create photo blank16 -width 16 -height 16
    image create photo blank32 -width 32 -height 32
    # This should just make blank icons for the window
    wm iconphoto .t blank16 blank32
    image delete blank16 blank32
} {}

test unixWm-62.0 {wm attributes -type void} -constraints unix -setup {
    destroy .t
    toplevel .t
} -body {
    wm attributes .t -type {}
} -cleanup {
    destroy .t
} -result {}

test unixWm-62.1 {wm attributes -type name} -constraints unix -setup {
    destroy .t
    toplevel .t
} -body {
    wm attributes .t -type dialog
} -cleanup {
    destroy .t
} -result {}

test unixWm-62.2 {wm attributes -type name} -constraints unix -setup {
    destroy .t
    toplevel .t
} -body {
    tkwait visibility .t
    wm attributes .t -type dialog
} -cleanup {
    destroy .t
} -result {}

test unixWm-62.3 {wm attributes -type list} -constraints unix -setup {
    destroy .t
    toplevel .t
} -body {
    wm attributes .t -type {xyzzy dialog}
} -cleanup {
    destroy .t
} -result {}

test unixWm-62.4 {wm attributes -type list} -constraints unix -setup {
    destroy .t
    toplevel .t
} -body {
    tkwait visibility .t
    wm attributes .t -type {xyzzy dialog}
} -cleanup {
    destroy .t
} -result {}

# cleanup
destroy .t
cleanupTests
return
@


1.47
log
@TIP #359: Extended window manager hints support for X11.

Modern unix window managers use a set of window properties to give
hints as to the purpose of a toplevel window. They then use these
hints to apply various animation and decoration options based on the
type (dialog, menu, tooltip and more).

This patch adds a [wm attributes $w -type] option to control and read
the type hint and makes use of this for the ttk::combobox and the
dialogs raised from the Tk library scripts.

Signed-off-by: Pat Thoyts <patthoyts@@users.sourceforge.net>
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.46 2008/10/08 18:57:47 dgp Exp $
d2507 1
a2507 1
test unixWm-62.1 {wm attributes -type name} -constraints unix -setup {
d2517 1
a2517 1
test unixWm-62.2 {wm attributes -type list} -constraints unix -setup {
d2526 1
a2526 1
test unixWm-62.2 {wm attributes -type list} -constraints unix -setup {
@


1.46
log
@        * tests/scrollbar.test: Revised testing of the cget subcommand so
        that it tests consistency with the configure subcommand and not
        agreement with a hardcoded value that will change as tastes in
        GUIs evolve.

        * unix/tkUnixWm.c:      Restored consistency of error messages from
        * macosx/tkMacOSXWm.c:  [wm iconphoto] with the test suite and across
        * tests/unixWm.test:    all platforms.  [Bug 2021443]
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.45 2008/07/23 23:24:25 nijtmans Exp $
d2449 1
a2449 1
} -result [list -alpha 1.0 -topmost 0 -zoomed 0 -fullscreen 0]
d2489 47
@


1.45
log
@fix [2021443] inconsistant "wrong # args" messages (for Tk)
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.44 2007/12/13 15:27:55 dgp Exp $
d2478 1
a2478 1
} {1 {wrong # args: should be "wm iconphoto window ?-default? image ?image ...?"}}
@


1.44
log
@merge stable branch onto HEAD
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.42.2.1 2007/11/01 16:37:24 dgp Exp $
d2478 1
a2478 1
} {1 {wrong # args: should be "wm iconphoto window ?-default? image1 ?image2 ...?"}}
@


1.44.2.1
log
@TIP #359: Extended window manager hints support for X11.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.44 2007/12/13 15:27:55 dgp Exp $
d2449 1
a2449 1
} -result [list -alpha 1.0 -topmost 0 -zoomed 0 -fullscreen 0 -type {}]
a2488 47
test unixWm-62.0 {wm attributes -type void} -constraints unix -setup {
    destroy .t
    toplevel .t
} -body {
    wm attributes .t -type {}
} -cleanup {
    destroy .t
} -result {}

test unixWm-62.1 {wm attributes -type name} -constraints unix -setup {
    destroy .t
    toplevel .t
} -body {
    wm attributes .t -type dialog
} -cleanup {
    destroy .t
} -result {}

test unixWm-62.1 {wm attributes -type name} -constraints unix -setup {
    destroy .t
    toplevel .t
} -body {
    tkwait visibility .t
    wm attributes .t -type dialog
} -cleanup {
    destroy .t
} -result {}

test unixWm-62.2 {wm attributes -type list} -constraints unix -setup {
    destroy .t
    toplevel .t
} -body {
    wm attributes .t -type {xyzzy dialog}
} -cleanup {
    destroy .t
} -result {}

test unixWm-62.2 {wm attributes -type list} -constraints unix -setup {
    destroy .t
    toplevel .t
} -body {
    tkwait visibility .t
    wm attributes .t -type {xyzzy dialog}
} -cleanup {
    destroy .t
} -result {}

@


1.44.2.2
log
@Dup test IDs
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.44.2.1 2010/01/20 23:43:52 patthoyts Exp $
d2507 1
a2507 1
test unixWm-62.2 {wm attributes -type name} -constraints unix -setup {
d2517 1
a2517 1
test unixWm-62.3 {wm attributes -type list} -constraints unix -setup {
d2526 1
a2526 1
test unixWm-62.4 {wm attributes -type list} -constraints unix -setup {
@


1.43
log
@	* tests/unixWm.test: note TIP#142 results and remove unnecessary
	catches.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.42 2007/05/09 12:52:44 das Exp $
@


1.42
log
@	* tests/constraints.tcl: ensure 'nonUnixUserInteraction' constraint is
				 set for aqua.

	* tests/choosedir.test:	add 'notAqua' constraints to X11-only tests;
	* tests/clrpick.test:	add 'nonUnixUserInteraction' to 'unix' tests
	* tests/menuDraw.test:	requiring interaction on aqua.
	* tests/unixMenu.test:
	* tests/unixWm.test:
	* tests/winMenu.test:
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.41 2005/11/16 02:51:38 jenglish Exp $
d37 1
a37 1
    catch {destroy .t}
d53 1
a53 1
catch {destroy .t}
d102 1
a102 1
    catch {destroy .t}
d111 1
a111 1
    catch {destroy .t}
d121 1
a121 1
    catch {destroy .t}
d132 1
a132 1
    catch {destroy .t}
d142 1
a142 1
    catch {destroy .t}
d151 1
a151 1
    catch {destroy .t}
d161 1
a161 1
    catch {destroy .t}
d170 1
a170 1
catch {destroy .t}
d221 1
a221 1
    catch {destroy .t}
d232 1
a232 1
catch {destroy .m}
d253 1
a253 1
catch {destroy .t}
d256 2
a257 2
    catch {destroy .t}
    catch {destroy .icon}
d265 1
a265 1
    catch {destroy .t}
d270 1
a270 1
    catch {destroy .t}
d275 2
a276 2
    catch {destroy .t}
    catch {destroy .icon}
d292 1
a292 1
    catch {destroy .t}
d297 1
a297 1
    catch {destroy .t}
d303 2
a304 2
    catch {destroy .t}
    catch {destroy .icon}
d314 1
a314 1
catch {destroy .icon2}
d316 2
a317 2
    catch {destroy .t}
    catch {destroy .icon}
d333 2
a334 2
    catch {destroy .t}
    catch {destroy .icon}
d376 1
a376 1
    catch {destroy .t}
d384 1
a384 1
    catch {destroy .t}
d394 1
a394 1
    catch {destroy .t}
d402 1
a402 1
    catch {destroy .t}
d410 1
a410 1
    catch {destroy .t}
d418 1
a418 1
    catch {destroy .t}
d426 2
a427 2
    catch {destroy .t}
    catch {destroy .f}
d450 1
a450 1
    catch {destroy .b}
d455 2
a456 2
catch {destroy .t}
catch {destroy .icon}
d515 1
a515 1
    catch {destroy .t2}
d527 1
a527 1
    catch {destroy .t2}
d547 1
a547 1
    catch {destroy .t2}
d558 1
a558 1
    catch {destroy .t2}
d569 1
a569 1
    catch {destroy .t2}
d576 1
a576 1
catch {destroy .t2}
d597 1
a597 1
    catch {destroy .t2}
d613 1
a613 1
    catch {destroy .icon}
d651 1
a651 1
    catch {destroy .t2}
d675 1
a675 1
    catch {destroy .t2}
d737 2
a738 2
catch {destroy .t}
catch {destroy .icon}
d762 1
a762 1
    catch {destroy .t2}
d772 2
a773 2
    catch {destroy .t2}
    catch {destroy .t3}
d808 1
a808 1
    catch {destroy .t2}
d816 1
a816 1
    catch {destroy .t2}
d825 1
a825 1
    catch {destroy .t2}
d834 1
a834 1
    catch {destroy .t2}
d845 1
a845 1
    catch {destroy .t2}
d878 1
a878 1
} {1 {ambiguous option "icon": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d920 1
a920 1
    catch {destroy .icon}
d940 1
a940 1
    catch {destroy .b}
d947 1
a947 1
    catch {destroy .icon}
d949 1
a949 1
    catch {destroy .t2}
d959 2
a960 2
    catch {destroy .icon}
    catch {destroy .icon2}
d972 1
a972 1
    catch {destroy .icon}
d984 2
a985 2
catch {destroy .t}
catch {destroy .icon}
d1062 1
a1062 2
catch {destroy .t}
catch {destroy .icon}
d1170 1
a1170 1
    catch {destroy .t2}
d1214 1
a1214 1
    catch {destroy .t2}
d1231 1
a1231 1
    catch {destroy .t2}
d1261 1
a1261 1
    catch {destroy .t2}
d1277 1
a1277 1
    catch {destroy .t2}
d1279 1
a1279 1
    catch {destroy .t3}
d1288 2
a1289 2
    catch {destroy .t2}
    catch {destroy .t3}
d1305 1
a1305 1
    catch {destroy .t2}
d1323 1
a1323 1
} {1 {bad option "unknown": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d1325 1
a1325 2
catch {destroy .t}
catch {destroy .icon}
d1328 1
a1328 1
    catch {destroy .t}
d1337 1
a1337 1
    catch {destroy .t}
d1349 1
a1349 1
    catch {destroy .t}
d1360 1
a1360 1
    catch {destroy .t}
d1385 1
a1385 1
    catch {destroy .t}
d1396 1
a1396 1
    catch {destroy .t}
d1411 1
a1411 1
    catch {destroy .t}
d1427 1
a1427 1
    catch {destroy .t}
d1445 1
a1445 1
    catch {destroy .t}
d1460 1
a1460 1
    catch {destroy .t}
d1470 1
a1470 1
    catch {destroy .t}
d1481 1
a1481 1
    catch {destroy .t}
d1492 1
a1492 1
    catch {destroy .t}
d1502 1
a1502 1
    catch {destroy .t}
d1513 1
a1513 1
    catch {destroy .t}
d1524 1
a1524 1
catch {destroy .t}
d1533 1
a1533 1
catch {destroy .t}
d1541 1
a1541 1
catch {destroy .t}
d1544 1
a1544 1
    catch {destroy .t}
d1556 1
a1556 1
    catch {destroy .t}
d1571 1
a1571 1
    catch {destroy .t}
d1584 1
a1584 1
    catch {destroy .t}
d1596 1
a1596 1
    catch {destroy .t}
d1612 1
a1612 1
    catch {destroy .t}
d1629 1
a1629 1
    catch {destroy .t}
d1643 1
a1643 1
    catch {destroy .t}
d1668 1
a1668 1
catch {destroy .t}
d1712 1
a1712 1
    catch {destroy .t}
d1727 1
a1727 1
    catch {destroy .t}
d1739 1
a1739 1
    catch {destroy .t}
d1829 1
a1829 1
    catch {destroy .t}
d1882 1
a1882 1
    catch {destroy .t}
d1899 1
a1899 1
    catch {destroy .t}
d1916 2
a1917 2
    catch {destroy .t}
    catch {destroy .t2}
d1930 1
a1930 1
    catch {destroy .t}
d2000 1
a2000 1
    catch {destroy .t}
d2004 1
a2004 1
    catch {destroy .t2}
d2011 1
a2011 1
	catch {destroy $w}
d2024 1
a2024 1
    catch {destroy .t}
d2029 1
a2029 1
    catch {destroy .t2}
d2050 1
a2050 1
	catch {destroy $w}
d2093 1
a2093 1
    catch {destroy .t}
d2100 1
a2100 1
    catch {destroy .t}
d2109 1
a2109 1
    catch {destroy .t}
d2120 1
a2120 1
    catch {destroy .t}
d2134 1
a2134 1
    catch {destroy .t}
d2146 1
a2146 1
    catch {destroy .t}
d2160 2
a2161 2
    catch {destroy .t}
    catch {destroy .m}
d2177 1
a2177 1
    catch {destroy .m}
d2192 1
a2192 1
    catch {destroy .t}
d2204 2
a2205 2
    catch {destroy .t}
    catch {destroy .f}
d2223 1
a2223 1
    catch {destroy .t}
d2240 1
a2240 1
    catch {destroy .t}
d2251 2
a2252 2
    catch {destroy .t}
    catch {destroy .f}
d2270 1
a2270 1
    catch {destroy .t}
d2283 2
a2284 2
    catch {destroy .t}
    catch {destroy .f}
d2303 1
a2303 1
    catch {destroy .t}
d2318 1
a2318 1
    catch {destroy .t}
d2333 1
a2333 1
    catch {destroy .t}
d2349 1
a2349 1
    catch {destroy .t}
d2490 1
a2490 1
catch {destroy .t}
@


1.42.2.1
log
@merge updates from HEAD
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.42 2007/05/09 12:52:44 das Exp $
d37 1
a37 1
    destroy .t
d53 1
a53 1
destroy .t
d102 1
a102 1
    destroy .t
d111 1
a111 1
    destroy .t
d121 1
a121 1
    destroy .t
d132 1
a132 1
    destroy .t
d142 1
a142 1
    destroy .t
d151 1
a151 1
    destroy .t
d161 1
a161 1
    destroy .t
d170 1
a170 1
destroy .t
d221 1
a221 1
    destroy .t
d232 1
a232 1
destroy .m
d253 1
a253 1
destroy .t
d256 2
a257 2
    destroy .t
    destroy .icon
d265 1
a265 1
    destroy .t
d270 1
a270 1
    destroy .t
d275 2
a276 2
    destroy .t
    destroy .icon
d292 1
a292 1
    destroy .t
d297 1
a297 1
    destroy .t
d303 2
a304 2
    destroy .t
    destroy .icon
d314 1
a314 1
destroy .icon2
d316 2
a317 2
    destroy .t
    destroy .icon
d333 2
a334 2
    destroy .t
    destroy .icon
d376 1
a376 1
    destroy .t
d384 1
a384 1
    destroy .t
d394 1
a394 1
    destroy .t
d402 1
a402 1
    destroy .t
d410 1
a410 1
    destroy .t
d418 1
a418 1
    destroy .t
d426 2
a427 2
    destroy .t
    destroy .f
d450 1
a450 1
    destroy .b
d455 2
a456 2
destroy .t
destroy .icon
d515 1
a515 1
    destroy .t2
d527 1
a527 1
    destroy .t2
d547 1
a547 1
    destroy .t2
d558 1
a558 1
    destroy .t2
d569 1
a569 1
    destroy .t2
d576 1
a576 1
destroy .t2
d597 1
a597 1
    destroy .t2
d613 1
a613 1
    destroy .icon
d651 1
a651 1
    destroy .t2
d675 1
a675 1
    destroy .t2
d737 2
a738 2
destroy .t
destroy .icon
d762 1
a762 1
    destroy .t2
d772 2
a773 2
    destroy .t2
    destroy .t3
d808 1
a808 1
    destroy .t2
d816 1
a816 1
    destroy .t2
d825 1
a825 1
    destroy .t2
d834 1
a834 1
    destroy .t2
d845 1
a845 1
    destroy .t2
d878 1
a878 1
} {1 {ambiguous option "icon": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, forget, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, manage, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d920 1
a920 1
    destroy .icon
d940 1
a940 1
    destroy .b
d947 1
a947 1
    destroy .icon
d949 1
a949 1
    destroy .t2
d959 2
a960 2
    destroy .icon
    destroy .icon2
d972 1
a972 1
    destroy .icon
d984 2
a985 2
destroy .t
destroy .icon
d1062 2
a1063 1
destroy .t .icon
d1171 1
a1171 1
    destroy .t2
d1215 1
a1215 1
    destroy .t2
d1232 1
a1232 1
    destroy .t2
d1262 1
a1262 1
    destroy .t2
d1278 1
a1278 1
    destroy .t2
d1280 1
a1280 1
    destroy .t3
d1289 2
a1290 2
    destroy .t2
    destroy .t3
d1306 1
a1306 1
    destroy .t2
d1324 1
a1324 1
} {1 {bad option "unknown": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, forget, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, manage, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d1326 2
a1327 1
destroy .t .icon
d1330 1
a1330 1
    destroy .t
d1339 1
a1339 1
    destroy .t
d1351 1
a1351 1
    destroy .t
d1362 1
a1362 1
    destroy .t
d1387 1
a1387 1
    destroy .t
d1398 1
a1398 1
    destroy .t
d1413 1
a1413 1
    destroy .t
d1429 1
a1429 1
    destroy .t
d1447 1
a1447 1
    destroy .t
d1462 1
a1462 1
    destroy .t
d1472 1
a1472 1
    destroy .t
d1483 1
a1483 1
    destroy .t
d1494 1
a1494 1
    destroy .t
d1504 1
a1504 1
    destroy .t
d1515 1
a1515 1
    destroy .t
d1526 1
a1526 1
destroy .t
d1535 1
a1535 1
destroy .t
d1543 1
a1543 1
destroy .t
d1546 1
a1546 1
    destroy .t
d1558 1
a1558 1
    destroy .t
d1573 1
a1573 1
    destroy .t
d1586 1
a1586 1
    destroy .t
d1598 1
a1598 1
    destroy .t
d1614 1
a1614 1
    destroy .t
d1631 1
a1631 1
    destroy .t
d1645 1
a1645 1
    destroy .t
d1670 1
a1670 1
destroy .t
d1714 1
a1714 1
    destroy .t
d1729 1
a1729 1
    destroy .t
d1741 1
a1741 1
    destroy .t
d1831 1
a1831 1
    destroy .t
d1884 1
a1884 1
    destroy .t
d1901 1
a1901 1
    destroy .t
d1918 2
a1919 2
    destroy .t
    destroy .t2
d1932 1
a1932 1
    destroy .t
d2002 1
a2002 1
    destroy .t
d2006 1
a2006 1
    destroy .t2
d2013 1
a2013 1
	destroy $w
d2026 1
a2026 1
    destroy .t
d2031 1
a2031 1
    destroy .t2
d2052 1
a2052 1
	destroy $w
d2095 1
a2095 1
    destroy .t
d2102 1
a2102 1
    destroy .t
d2111 1
a2111 1
    destroy .t
d2122 1
a2122 1
    destroy .t
d2136 1
a2136 1
    destroy .t
d2148 1
a2148 1
    destroy .t
d2162 2
a2163 2
    destroy .t
    destroy .m
d2179 1
a2179 1
    destroy .m
d2194 1
a2194 1
    destroy .t
d2206 2
a2207 2
    destroy .t
    destroy .f
d2225 1
a2225 1
    destroy .t
d2242 1
a2242 1
    destroy .t
d2253 2
a2254 2
    destroy .t
    destroy .f
d2272 1
a2272 1
    destroy .t
d2285 2
a2286 2
    destroy .t
    destroy .f
d2305 1
a2305 1
    destroy .t
d2320 1
a2320 1
    destroy .t
d2335 1
a2335 1
    destroy .t
d2351 1
a2351 1
    destroy .t
d2492 1
a2492 1
destroy .t
@


1.41
log
@Added support for [wm attributes] on X11 [TIP#231, patch#1062022].
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.40 2004/10/05 22:04:45 hobbs Exp $
d2161 1
a2161 1
test unixWm-54.1 {TkpMakeMenuWindow procedure, setting save_under} unix {
d2178 1
a2178 1
test unixWm-54.2 {TkpMakeMenuWindow procedure, setting override_redirect} unix {
@


1.40
log
@	* doc/wm.n (iconphoto):           added support for Tk photo
	* generic/tkInt.h (TkDisplay):    images as titlebar icons. TIP #159
	* win/tkWinWm.c (WmIconphotoCmd): wm iconphoto ?-default? image1 ...
	* macosx/tkMacOSXWm.c (WmIconphotoCmd): Implemented for Win/Unix,
	* unix/tkUnixWm.c (WmIconphotoCmd):     stubbed out for OS X.
	* tests/wm.test, tests/unixWm.test, tests/winWm.test: [Bug 815751]
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.39 2004/06/24 12:45:44 dkf Exp $
d2441 7
a2447 1
test unixWm-60.1 {wm attributes} unix {
d2451 22
a2472 2
} {}
test unixWm-60.2 {wm attributes} unix {
d2475 2
a2476 2
    list [catch {wm attributes .t -foo} msg] $msg
} {1 {wrong # args: should be "wm attributes window"}}
@


1.39
log
@Use standard constraint names
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.38 2004/06/17 22:38:57 dkf Exp $
d878 1
a878 1
} {1 {ambiguous option "icon": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d1324 1
a1324 1
} {1 {bad option "unknown": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d2452 13
@


1.38
log
@Steps towards systematization of test constraints in Tk test suite
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.37 2004/06/16 20:03:19 jenglish Exp $
d694 1
a694 1
test unixWm-19.6 {Tk_WmCmd procedure, "geometry" option} {unix} {
@


1.37
log
@Fix for #742882 "Potential division by zero in gridded wm geometry"
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.36 2003/11/18 01:47:51 dgp Exp $
a416 2
testConstraint testmenubar [llength [info commands testmenubar]]

@


1.36
log
@        * tests/constraints.tcl:When running the test suite in a process
        * tests/image.test:     where Tk has been [load]ed, there's no
        * tests/select.test:    guarantee that child processes created by
        * tests/unixWm.test:    [exec [interpreter]] will have Tk in them.
        * tests/window.test:    Made modifications to force a [load] of Tk
                                in those situations.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.35 2003/10/15 20:04:03 jenglish Exp $
d731 1
a731 1
} {1 {widthInc can't be < 0}}
d737 1
a737 1
} {1 {heightInc can't be < 0}}
@


1.35
log
@Delete WM_TRANSIENT_FOR property instead of setting it to None
when making a window nontransient [Bug #632816 "cannot remove transient"]
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.34 2003/04/01 21:06:57 dgp Exp $
d16 2
d2399 2
a2400 1
    set script [makeFile {
d2407 2
a2408 1
    } script]
d2418 2
a2419 1
    set script [makeFile {
d2432 2
a2433 1
    } script]
@


1.34
log
@        * tests/all.tcl:                Made better use of a common
        * tests/constraints.tcl:        -loadfile to hold definitions
        * tests/*.test:                 common to all test files.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.33 2003/03/18 16:30:42 dgp Exp $
d1276 1
a1276 1
} {{} {} .t 0 {} 0x0}
d1287 1
a1287 1
} {{} 0x0}
@


1.33
log
@        * tests/unixWm.test (unixWm-41.2): Corrected typo in 2003-03-13
        commit.  Thanks Larry Virden.  [Bug 705567]
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.32 2003/03/13 19:34:41 dgp Exp $
d13 1
a13 4
namespace import -force tcltest::configure
namespace import -force tcltest::testsDirectory
configure -testdir [file join [pwd] [file dirname [info script]]]
configure -loadfile [file join [testsDirectory] constraints.tcl]
a15 4
namespace import -force tcltest::interpreter
namespace import -force tcltest::makeFile
namespace import -force tcltest::removeFile

d2450 1
a2450 1
::tcltest::cleanupTests
@


1.32
log
@        * tests/unixWm.test:  Constrained all tests older than revision 1.21
        to run only on Unix.  Alternative approach did not match maintainer
        habits.
        * tests/spinbox.test (spinbox-17.4): Avoid long failure message.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.31 2003/03/12 03:25:52 mdejong Exp $
d1368 1
a1368 1
test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable testmenubar} unix {
@


1.31
log
@	* tests/unixWm.test: Add the testwrapper
	constraint to tests that depend on the
	testwrapper command. These tests should
	not be run under Windows for example.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.30 2003/03/12 00:25:41 mdejong Exp $
d398 1
a398 1
test unixWm-9.3 {TkWmMapWindow procedure, iconic windows} {
d406 1
a406 1
test unixWm-9.4 {TkWmMapWindow procedure, icon windows} {
d414 1
a414 1
test unixWm-9.5 {TkWmMapWindow procedure, normal windows} {
d424 1
a424 1
test unixWm-10.1 {TkWmDeadWindow procedure, canceling UpdateGeometry idle handler} {
d447 1
a447 1
test unixWm-11.1 {Tk_WmCmd procedure, miscellaneous errors} {
d450 1
a450 1
test unixWm-11.2 {Tk_WmCmd procedure, miscellaneous errors} {
d453 1
a453 1
test unixWm-11.3 {Tk_WmCmd procedure, miscellaneous errors} {
d456 1
a456 1
test unixWm-11.4 {Tk_WmCmd procedure, miscellaneous errors} {
d469 1
a469 1
test unixWm-12.1 {Tk_WmCmd procedure, "aspect" option} {
d472 1
a472 1
test unixWm-12.2 {Tk_WmCmd procedure, "aspect" option} {
d475 1
a475 1
test unixWm-12.3 {Tk_WmCmd procedure, "aspect" option} {
d483 1
a483 1
test unixWm-12.4 {Tk_WmCmd procedure, "aspect" option} {
d486 1
a486 1
test unixWm-12.5 {Tk_WmCmd procedure, "aspect" option} {
d489 1
a489 1
test unixWm-12.6 {Tk_WmCmd procedure, "aspect" option} {
d492 1
a492 1
test unixWm-12.7 {Tk_WmCmd procedure, "aspect" option} {
d495 1
a495 1
test unixWm-12.8 {Tk_WmCmd procedure, "aspect" option} {
d498 1
a498 1
test unixWm-12.9 {Tk_WmCmd procedure, "aspect" option} {
d501 1
a501 1
test unixWm-12.10 {Tk_WmCmd procedure, "aspect" option} {
d504 1
a504 1
test unixWm-12.11 {Tk_WmCmd procedure, "aspect" option} {
d508 1
a508 1
test unixWm-13.1 {Tk_WmCmd procedure, "client" option} {
d521 1
a521 1
test unixWm-13.3 {Tk_WmCmd procedure, "client" option, unmapped window} {
d530 1
a530 1
test unixWm-14.1 {Tk_WmCmd procedure, "colormapwindows" option} {
d533 1
a533 1
test unixWm-14.2 {Tk_WmCmd procedure, "colormapwindows" option} {
d547 1
a547 1
test unixWm-14.3 {Tk_WmCmd procedure, "colormapwindows" option} {
d550 1
a550 1
test unixWm-14.4 {Tk_WmCmd procedure, "colormapwindows" option} {
d553 1
a553 1
test unixWm-14.5 {Tk_WmCmd procedure, "colormapwindows" option} {
d564 1
a564 1
test unixWm-14.6 {Tk_WmCmd procedure, "colormapwindows" option} {
d575 1
a575 1
test unixWm-14.7 {Tk_WmCmd procedure, "colormapwindows" option} {
d585 1
a585 1
test unixWm-15.1 {Tk_WmCmd procedure, "command" option} {
d588 1
a588 1
test unixWm-15.2 {Tk_WmCmd procedure, "command" option} {
d603 1
a603 1
test unixWm-15.4 {Tk_WmCmd procedure, "command" option, window not mapped} {
d612 1
a612 1
test unixWm-15.5 {Tk_WmCmd procedure, "command" option} {
d616 1
a616 1
test unixWm-16.1 {Tk_WmCmd procedure, "deiconify" option} {
d619 1
a619 1
test unixWm-16.2 {Tk_WmCmd procedure, "deiconify" option} {
d627 1
a627 1
test unixWm-16.3 {Tk_WmCmd procedure, "deiconify" option} {
d635 1
a635 1
test unixWm-17.1 {Tk_WmCmd procedure, "focusmodel" option} {
d638 1
a638 1
test unixWm-17.2 {Tk_WmCmd procedure, "focusmodel" option} {
d641 1
a641 1
test unixWm-17.3 {Tk_WmCmd procedure, "focusmodel" option} {
d651 1
a651 1
test unixWm-18.1 {Tk_WmCmd procedure, "frame" option} {
d654 1
a654 1
test unixWm-18.2 {Tk_WmCmd procedure, "frame" option} nonPortable {
d657 1
a657 1
test unixWm-18.3 {Tk_WmCmd procedure, "frame" option} nonPortable {
d668 1
a668 1
test unixWm-19.1 {Tk_WmCmd procedure, "geometry" option} {
d671 1
a671 1
test unixWm-19.2 {Tk_WmCmd procedure, "geometry" option} nonPortable {
d676 1
a676 1
test unixWm-19.3 {Tk_WmCmd procedure, "geometry" option} nonPortable {
d681 1
a681 1
test unixWm-19.4 {Tk_WmCmd procedure, "geometry" option} nonPortable {
d692 1
a692 1
test unixWm-19.5 {Tk_WmCmd procedure, "geometry" option} nonPortable {
d701 1
a701 1
test unixWm-19.6 {Tk_WmCmd procedure, "geometry" option} {
d705 1
a705 1
test unixWm-20.1 {Tk_WmCmd procedure, "grid" option} {
d708 1
a708 1
test unixWm-20.2 {Tk_WmCmd procedure, "grid" option} {
d711 1
a711 1
test unixWm-20.3 {Tk_WmCmd procedure, "grid" option} {
d719 1
a719 1
test unixWm-20.4 {Tk_WmCmd procedure, "grid" option} {
d722 1
a722 1
test unixWm-20.5 {Tk_WmCmd procedure, "grid" option} {
d725 1
a725 1
test unixWm-20.6 {Tk_WmCmd procedure, "grid" option} {
d728 1
a728 1
test unixWm-20.7 {Tk_WmCmd procedure, "grid" option} {
d731 1
a731 1
test unixWm-20.8 {Tk_WmCmd procedure, "grid" option} {
d734 1
a734 1
test unixWm-20.9 {Tk_WmCmd procedure, "grid" option} {
d737 1
a737 1
test unixWm-20.10 {Tk_WmCmd procedure, "grid" option} {
d740 1
a740 1
test unixWm-20.11 {Tk_WmCmd procedure, "grid" option} {
d750 1
a750 1
test unixWm-21.1 {Tk_WmCmd procedure, "group" option} {
d753 1
a753 1
test unixWm-21.2 {Tk_WmCmd procedure, "group" option} {
d807 1
a807 1
test unixWm-22.3 {Tk_WmCmd procedure, "iconbitmap" option} {
d811 1
a811 1
test unixWm-23.1 {Tk_WmCmd procedure, "iconify" option} {
d814 1
a814 1
test unixWm-23.2 {Tk_WmCmd procedure, "iconify" option} {
d822 1
a822 1
test unixWm-23.3 {Tk_WmCmd procedure, "iconify" option} {
d831 1
a831 1
test unixWm-23.4 {Tk_WmCmd procedure, "iconify" option} {
d840 1
a840 1
test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} {
d851 1
a851 1
test unixWm-23.6 {Tk_WmCmd procedure, "iconify" option} {
d864 1
a864 1
test unixWm-24.1 {Tk_WmCmd procedure, "iconmask" option} {
d879 1
a879 1
test unixWm-24.3 {Tk_WmCmd procedure, "iconmask" option} {
d883 1
a883 1
test unixWm-25.1 {Tk_WmCmd procedure, "iconname" option} {
d886 1
a886 1
test unixWm-25.2 {Tk_WmCmd procedure, "iconname" option} {
d898 1
a898 1
test unixWm-26.1 {Tk_WmCmd procedure, "iconposition" option} {
d901 1
a901 1
test unixWm-26.2 {Tk_WmCmd procedure, "iconposition" option} {
d916 1
a916 1
test unixWm-26.4 {Tk_WmCmd procedure, "iconposition" option} {
d919 1
a919 1
test unixWm-26.5 {Tk_WmCmd procedure, "iconposition" option} {
d923 1
a923 1
test unixWm-27.1 {Tk_WmCmd procedure, "iconwindow" option} {
d943 1
a943 1
test unixWm-27.3 {Tk_WmCmd procedure, "iconwindow" option} {
d946 1
a946 1
test unixWm-27.4 {Tk_WmCmd procedure, "iconwindow" option} {
d953 1
a953 1
test unixWm-27.5 {Tk_WmCmd procedure, "iconwindow" option} {
d965 1
a965 1
test unixWm-27.6 {Tk_WmCmd procedure, "iconwindow" option, changing icons} {
d978 1
a978 1
test unixWm-27.7 {Tk_WmCmd procedure, "iconwindow" option, withdrawing icon} {
d1075 1
a1075 1
test unixWm-30.1 {Tk_WmCmd procedure, "overrideredirect" option} {
d1078 1
a1078 1
test unixWm-30.2 {Tk_WmCmd procedure, "overrideredirect" option} {
d1081 1
a1081 1
test unixWm-30.3 {Tk_WmCmd procedure, "overrideredirect" option} {
d1090 1
a1090 1
test unixWm-31.1 {Tk_WmCmd procedure, "positionfrom" option} {
d1107 1
a1107 1
test unixWm-31.3 {Tk_WmCmd procedure, "positionfrom" option} {
d1111 1
a1111 1
test unixWm-32.1 {Tk_WmCmd procedure, "protocol" option} {
d1114 1
a1114 1
test unixWm-32.2 {Tk_WmCmd procedure, "protocol" option} {
d1145 1
a1145 1
test unixWm-32.4 {Tk_WmCmd procedure, "protocol" option} {
d1154 1
a1154 1
test unixWm-32.5 {Tk_WmCmd procedure, "protocol" option} {
d1162 1
a1162 1
test unixWm-33.1 {Tk_WmCmd procedure, "resizable" option} {
d1165 1
a1165 1
test unixWm-33.2 {Tk_WmCmd procedure, "resizable" option} {
d1168 1
a1168 1
test unixWm-33.3 {Tk_WmCmd procedure, "resizable" option} {
d1171 1
a1171 1
test unixWm-33.4 {Tk_WmCmd procedure, "resizable" option} {
d1174 1
a1174 1
test unixWm-33.5 {Tk_WmCmd procedure, "resizable" option} {
d1177 1
a1177 1
test unixWm-33.6 {Tk_WmCmd procedure, "resizable" option} {
d1193 1
a1193 1
test unixWm-34.1 {Tk_WmCmd procedure, "sizefrom" option} {
d1210 1
a1210 1
test unixWm-34.3 {Tk_WmCmd procedure, "sizefrom" option} {
d1217 1
a1217 1
test unixWm-35.2 {Tk_WmCmd procedure, "state" option} {
d1220 1
a1220 1
test unixWm-35.3 {Tk_WmCmd procedure, "state" option} {
d1237 1
a1237 1
test unixWm-35.4 {Tk_WmCmd procedure, "state" option} {
d1255 1
a1255 1
test unixWm-36.1 {Tk_WmCmd procedure, "title" option} {
d1309 1
a1309 1
test unixWm-38.1 {Tk_WmCmd procedure, "withdraw" option} {
d1312 1
a1312 1
test unixWm-38.2 {Tk_WmCmd procedure, "withdraw" option} {
d1321 1
a1321 1
test unixWm-38.3 {Tk_WmCmd procedure, "withdraw" option} {
d1329 1
a1329 1
test unixWm-39.1 {Tk_WmCmd procedure, miscellaneous} {
d1336 1
a1336 1
test unixWm-40.1 {Tk_SetGrid procedure, set grid dimensions before turning on grid} {nonPortable} {
d1345 1
a1345 1
test unixWm-40.2 {Tk_SetGrid procedure, turning on grid when dimensions already set} {
d1357 1
a1357 1
test unixWm-41.1 {ConfigureEvent procedure, internally generated size changes} {
d1368 1
a1368 1
test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable testmenubar} {
d1393 1
a1393 1
test unixWm-41.3 {ConfigureEvent procedure, synthesized Configure events} {
d1404 1
a1404 1
test unixWm-41.4 {ConfigureEvent procedure, synthesized Configure events} {
d1419 1
a1419 1
test unixWm-42.1 {WrapperEventProc procedure, map and unmap events} {
d1435 1
a1435 1
test unixWm-43.1 {TopLevelReqProc procedure, embedded in same process} {
d1453 1
a1453 1
	{nonPortable} {
d1468 1
a1468 1
test unixWm-44.1 {UpdateGeometryInfo procedure, width/height computation} {
d1478 1
a1478 1
test unixWm-44.2 {UpdateGeometryInfo procedure, width/height computation} {
d1489 1
a1489 1
test unixWm-44.3 {UpdateGeometryInfo procedure, width/height computation} {
d1500 1
a1500 1
test unixWm-44.4 {UpdateGeometryInfo procedure, width/height computation} {
d1510 1
a1510 1
test unixWm-44.5 {UpdateGeometryInfo procedure, negative width} {
d1521 1
a1521 1
test unixWm-44.6 {UpdateGeometryInfo procedure, negative height} {
d1535 1
a1535 1
test unixWm-44.7 {UpdateGeometryInfo procedure, computing position} {
d1544 1
a1544 1
test unixWm-44.8 {UpdateGeometryInfo procedure, computing position} {
d1637 1
a1637 1
test unixWm-46.1 {WaitForEvent procedure, use of modal timeout} {
d1651 1
a1651 1
test unixWm-47.1 {WaitRestrictProc procedure} {nonPortable} {
d1682 1
a1682 1
test unixWm-48.1 {ParseGeometry procedure} {
d1687 1
a1687 1
test unixWm-48.2 {ParseGeometry procedure} {
d1690 1
a1690 1
test unixWm-48.3 {ParseGeometry procedure} {
d1693 1
a1693 1
test unixWm-48.4 {ParseGeometry procedure} {
d1696 1
a1696 1
test unixWm-48.5 {ParseGeometry procedure} {
d1699 1
a1699 1
test unixWm-48.6 {ParseGeometry procedure} {
d1702 1
a1702 1
test unixWm-48.7 {ParseGeometry procedure} {
d1705 1
a1705 1
test unixWm-48.8 {ParseGeometry procedure} {
d1708 1
a1708 1
test unixWm-48.9 {ParseGeometry procedure} {
d1711 1
a1711 1
test unixWm-48.10 {ParseGeometry procedure} {
d1714 1
a1714 1
test unixWm-48.11 {ParseGeometry procedure} {
d1717 1
a1717 1
test unixWm-48.12 {ParseGeometry procedure} {
d1720 1
a1720 1
test unixWm-48.13 {ParseGeometry procedure, resize causes window to move} {
d1735 1
a1735 1
test unixWm-49.1 {Tk_GetRootCoords procedure} {
d1767 1
a1767 1
test unixWm-50.1 {Tk_CoordsToWindow procedure, finding a toplevel, x-coords} {
d1787 1
a1787 1
test unixWm-50.2 {Tk_CoordsToWindow procedure, finding a toplevel, y-coords and overrideredirect} {
d1837 1
a1837 1
test unixWm-50.4 {Tk_CoordsToWindow procedure, window in other application} {
d1873 1
a1873 1
test unixWm-50.6 {Tk_CoordsToWindow procedure, embedding within one app.} {
d1890 1
a1890 1
test unixWm-50.7 {Tk_CoordsToWindow procedure, more basics} {
d1907 1
a1907 1
test unixWm-50.8 {Tk_CoordsToWindow procedure, more basics} {
d1924 1
a1924 1
test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} {
d1938 1
a1938 1
test unixWm-50.10 {Tk_CoordsToWindow procedure, unmapped windows} {
d1956 1
a1956 1
test unixWm-51.1 {TkWmRestackToplevel procedure, basic tests} {nonPortable} {
d1962 1
a1962 1
test unixWm-51.2 {TkWmRestackToplevel procedure, basic tests} {nonPortable} {
d1968 1
a1968 1
test unixWm-51.3 {TkWmRestackToplevel procedure, basic tests} {nonPortable} {
d1981 1
a1981 1
test unixWm-51.4 {TkWmRestackToplevel procedure, basic tests} {nonPortable} {
d1991 1
a1991 1
test unixWm-51.5 {TkWmRestackToplevel procedure, basic tests} {nonPortable} {
d2008 1
a2008 1
test unixWm-51.6 {TkWmRestackToplevel procedure, window to be stacked isn't mapped} {
d2018 1
a2018 1
test unixWm-51.7 {TkWmRestackToplevel procedure, other window isn't mapped} {
d2032 1
a2032 1
test unixWm-51.8 {TkWmRestackToplevel procedure, overrideredirect windows} {
d2057 1
a2057 1
test unixWm-51.9 {TkWmRestackToplevel procedure, other window overrideredirect} {
d2079 1
a2079 1
test unixWm-51.10 {TkWmRestackToplevel procedure, don't move window that's already in the right place} {
d2085 1
a2085 1
test unixWm-51.11 {TkWmRestackToplevel procedure, don't move window that's already in the right place} {
d2090 1
a2090 1
test unixWm-51.12 {TkWmRestackToplevel procedure, don't move window that's already in the right place} {
d2095 1
a2095 1
test unixWm-51.13 {TkWmRestackToplevel procedure, don't move window that's already in the right place} {
d2101 1
a2101 1
test unixWm-52.1 {TkWmAddToColormapWindows procedure} {
d2108 1
a2108 1
test unixWm-52.2 {TkWmAddToColormapWindows procedure} {
d2117 1
a2117 1
test unixWm-52.3 {TkWmAddToColormapWindows procedure} {
d2128 1
a2128 1
test unixWm-52.4 {TkWmAddToColormapWindows procedure} {
d2142 1
a2142 1
test unixWm-53.1 {TkWmRemoveFromColormapWindows procedure} {
d2154 1
a2154 1
test unixWm-53.2 {TkWmRemoveFromColormapWindows procedure} {
d2390 1
a2390 1
test unixWm-59.1 {exit processing} {
d2403 1
a2403 1
test unixWm-59.2 {exit processing} {
d2420 1
a2420 1
test unixWm-59.3 {exit processing} {
@


1.30
log
@	* doc/wm.n (minimize, maximize): Remove claim
	that the resizable command keeps scripts from
	changing the size of windows since it is
	not true. The resizable command only applies
	to user sizing via user interaction.
	* tests/unixWm.test: Replace broken tests with
	the nonPortable constraint with new tests for
	maxsize and minsize options. These tests
	verify that setting the minsize and maxsize
	will resize the window if needed, and that
	the wm hints will be updated with the new sizes.
	* tests/wm.test: Add an exhaustive set of tests
	for the wm maxsize and wm minsize commands.
	These tests verify that setting the minsize
	and maxsize will resize the window if needed.
	These tests have only been run under Win98
	and Window Maker under Linux, so further tweaking
	may be needed for other systems.
	* unix/tkUnixWm.c (UpdateGeometryInfo, UpdateSizeHints):
	Fixup comments and initialization for the minWidth,
	minHeight, maxWidth, maxHeight, width, and height
 	members of the WmInfo struct. Check to ensure
	that a new toplevel window size is not larger
	than the maxsize or smaller than the minsize
	when updating the geometry at idle time.
	Pass new width and height values to the
	UpdateSizeHints method so that it can properly
	set the window min and max sizes for a window
	that cannot be resized by the user. This fixes
	a bug where the window resizes back to the original
	size when the user clicks on the window border.
	* win/tkWinWm.c (UpdateGeometryInfo):
	Fixup comments and initialization for the minWidth,
	minHeight, maxWidth, maxHeight, width, and height
 	members of the WmInfo struct. Check to ensure
	that a new toplevel window size is not larger
	than the maxsize or smaller than the minsize
	when updating the geometry at idle time.
	[Patch 568861]
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.29 2002/11/07 22:27:04 mdejong Exp $
d998 1
a998 1
        maxsize should update WM_NORMAL_HINTS} {
d1009 1
a1009 1
        set the maxsize in WM_NORMAL_HINTS} {
d1022 1
a1022 1
        interactive resizable flag is set to 0} {
d1034 1
a1034 1
        minsize should update WM_NORMAL_HINTS} {
d1045 1
a1045 1
        set the maxsize in WM_NORMAL_HINTS} {
d1058 1
a1058 1
        interactive resizable flag is set to 0} {
@


1.29
log
@	* tests/unixWm.test: Add short delay to test unixWm-51.7
	to account for raise/lower changes in TIP 107. This allows
	the test case to pass under Window Maker on Linux.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.28 2002/09/06 16:07:37 dgp Exp $
a990 14
test unixWm-28.1 {Tk_WmCmd procedure, "maxsize" option} {nonPortable} {
    wm maxsize .t
}  {1137 870}

test unixWm-28.2 {Tk_WmCmd procedure, "maxsize" option} {nonPortable} {
    # Not portable, because some window managers let applications override
    # minsize and maxsize.

    wm maxsize .t 200 150
    wm geom .t 300x200
    update
    list [winfo width .t] [winfo height .t]
} {200 150}

d997 35
a1031 3
test unixWm-29.1 {Tk_WmCmd procedure, "minsize" option} {nonPortable} {
    # Not portable, because some window managers let applications override
    # minsize and maxsize.
d1033 5
a1037 2
    wm minsize .t 150 100
    wm geom .t 50x50
d1039 29
a1067 2
    list [winfo width .t] [winfo height .t]
} {150 100}
@


1.29.2.1
log
@        * tests/unixWm.test:  Constrained all tests older than revision 1.21
        to run only on Unix.  Alternative approach did not match maintainer
        habits.
        * tests/spinbox.test (spinbox-17.4): Avoid long failure message.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.29 2002/11/07 22:27:04 mdejong Exp $
d398 1
a398 1
test unixWm-9.3 {TkWmMapWindow procedure, iconic windows} unix {
d406 1
a406 1
test unixWm-9.4 {TkWmMapWindow procedure, icon windows} unix {
d414 1
a414 1
test unixWm-9.5 {TkWmMapWindow procedure, normal windows} unix {
d424 1
a424 1
test unixWm-10.1 {TkWmDeadWindow procedure, canceling UpdateGeometry idle handler} unix {
d447 1
a447 1
test unixWm-11.1 {Tk_WmCmd procedure, miscellaneous errors} unix {
d450 1
a450 1
test unixWm-11.2 {Tk_WmCmd procedure, miscellaneous errors} unix {
d453 1
a453 1
test unixWm-11.3 {Tk_WmCmd procedure, miscellaneous errors} unix {
d456 1
a456 1
test unixWm-11.4 {Tk_WmCmd procedure, miscellaneous errors} unix {
d469 1
a469 1
test unixWm-12.1 {Tk_WmCmd procedure, "aspect" option} unix {
d472 1
a472 1
test unixWm-12.2 {Tk_WmCmd procedure, "aspect" option} unix {
d475 1
a475 1
test unixWm-12.3 {Tk_WmCmd procedure, "aspect" option} unix {
d483 1
a483 1
test unixWm-12.4 {Tk_WmCmd procedure, "aspect" option} unix {
d486 1
a486 1
test unixWm-12.5 {Tk_WmCmd procedure, "aspect" option} unix {
d489 1
a489 1
test unixWm-12.6 {Tk_WmCmd procedure, "aspect" option} unix {
d492 1
a492 1
test unixWm-12.7 {Tk_WmCmd procedure, "aspect" option} unix {
d495 1
a495 1
test unixWm-12.8 {Tk_WmCmd procedure, "aspect" option} unix {
d498 1
a498 1
test unixWm-12.9 {Tk_WmCmd procedure, "aspect" option} unix {
d501 1
a501 1
test unixWm-12.10 {Tk_WmCmd procedure, "aspect" option} unix {
d504 1
a504 1
test unixWm-12.11 {Tk_WmCmd procedure, "aspect" option} unix {
d508 1
a508 1
test unixWm-13.1 {Tk_WmCmd procedure, "client" option} unix {
d521 1
a521 1
test unixWm-13.3 {Tk_WmCmd procedure, "client" option, unmapped window} unix {
d530 1
a530 1
test unixWm-14.1 {Tk_WmCmd procedure, "colormapwindows" option} unix {
d533 1
a533 1
test unixWm-14.2 {Tk_WmCmd procedure, "colormapwindows" option} unix {
d547 1
a547 1
test unixWm-14.3 {Tk_WmCmd procedure, "colormapwindows" option} unix {
d550 1
a550 1
test unixWm-14.4 {Tk_WmCmd procedure, "colormapwindows" option} unix {
d553 1
a553 1
test unixWm-14.5 {Tk_WmCmd procedure, "colormapwindows" option} unix {
d564 1
a564 1
test unixWm-14.6 {Tk_WmCmd procedure, "colormapwindows" option} unix {
d575 1
a575 1
test unixWm-14.7 {Tk_WmCmd procedure, "colormapwindows" option} unix {
d585 1
a585 1
test unixWm-15.1 {Tk_WmCmd procedure, "command" option} unix {
d588 1
a588 1
test unixWm-15.2 {Tk_WmCmd procedure, "command" option} unix {
d603 1
a603 1
test unixWm-15.4 {Tk_WmCmd procedure, "command" option, window not mapped} unix {
d612 1
a612 1
test unixWm-15.5 {Tk_WmCmd procedure, "command" option} unix {
d616 1
a616 1
test unixWm-16.1 {Tk_WmCmd procedure, "deiconify" option} unix {
d619 1
a619 1
test unixWm-16.2 {Tk_WmCmd procedure, "deiconify" option} unix {
d627 1
a627 1
test unixWm-16.3 {Tk_WmCmd procedure, "deiconify" option} unix {
d635 1
a635 1
test unixWm-17.1 {Tk_WmCmd procedure, "focusmodel" option} unix {
d638 1
a638 1
test unixWm-17.2 {Tk_WmCmd procedure, "focusmodel" option} unix {
d641 1
a641 1
test unixWm-17.3 {Tk_WmCmd procedure, "focusmodel" option} unix {
d651 1
a651 1
test unixWm-18.1 {Tk_WmCmd procedure, "frame" option} unix {
d654 1
a654 1
test unixWm-18.2 {Tk_WmCmd procedure, "frame" option} {unix nonPortable} {
d657 1
a657 1
test unixWm-18.3 {Tk_WmCmd procedure, "frame" option} {unix nonPortable} {
d668 1
a668 1
test unixWm-19.1 {Tk_WmCmd procedure, "geometry" option} unix {
d671 1
a671 1
test unixWm-19.2 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} {
d676 1
a676 1
test unixWm-19.3 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} {
d681 1
a681 1
test unixWm-19.4 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} {
d692 1
a692 1
test unixWm-19.5 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} {
d701 1
a701 1
test unixWm-19.6 {Tk_WmCmd procedure, "geometry" option} {unix} {
d705 1
a705 1
test unixWm-20.1 {Tk_WmCmd procedure, "grid" option} unix {
d708 1
a708 1
test unixWm-20.2 {Tk_WmCmd procedure, "grid" option} unix {
d711 1
a711 1
test unixWm-20.3 {Tk_WmCmd procedure, "grid" option} unix {
d719 1
a719 1
test unixWm-20.4 {Tk_WmCmd procedure, "grid" option} unix {
d722 1
a722 1
test unixWm-20.5 {Tk_WmCmd procedure, "grid" option} unix {
d725 1
a725 1
test unixWm-20.6 {Tk_WmCmd procedure, "grid" option} unix {
d728 1
a728 1
test unixWm-20.7 {Tk_WmCmd procedure, "grid" option} unix {
d731 1
a731 1
test unixWm-20.8 {Tk_WmCmd procedure, "grid" option} unix {
d734 1
a734 1
test unixWm-20.9 {Tk_WmCmd procedure, "grid" option} unix {
d737 1
a737 1
test unixWm-20.10 {Tk_WmCmd procedure, "grid" option} unix {
d740 1
a740 1
test unixWm-20.11 {Tk_WmCmd procedure, "grid" option} unix {
d750 1
a750 1
test unixWm-21.1 {Tk_WmCmd procedure, "group" option} unix {
d753 1
a753 1
test unixWm-21.2 {Tk_WmCmd procedure, "group" option} unix {
d807 1
a807 1
test unixWm-22.3 {Tk_WmCmd procedure, "iconbitmap" option} unix {
d811 1
a811 1
test unixWm-23.1 {Tk_WmCmd procedure, "iconify" option} unix {
d814 1
a814 1
test unixWm-23.2 {Tk_WmCmd procedure, "iconify" option} unix {
d822 1
a822 1
test unixWm-23.3 {Tk_WmCmd procedure, "iconify" option} unix {
d831 1
a831 1
test unixWm-23.4 {Tk_WmCmd procedure, "iconify" option} unix {
d840 1
a840 1
test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} unix {
d851 1
a851 1
test unixWm-23.6 {Tk_WmCmd procedure, "iconify" option} unix {
d864 1
a864 1
test unixWm-24.1 {Tk_WmCmd procedure, "iconmask" option} unix {
d879 1
a879 1
test unixWm-24.3 {Tk_WmCmd procedure, "iconmask" option} unix {
d883 1
a883 1
test unixWm-25.1 {Tk_WmCmd procedure, "iconname" option} unix {
d886 1
a886 1
test unixWm-25.2 {Tk_WmCmd procedure, "iconname" option} unix {
d898 1
a898 1
test unixWm-26.1 {Tk_WmCmd procedure, "iconposition" option} unix {
d901 1
a901 1
test unixWm-26.2 {Tk_WmCmd procedure, "iconposition" option} unix {
d916 1
a916 1
test unixWm-26.4 {Tk_WmCmd procedure, "iconposition" option} unix {
d919 1
a919 1
test unixWm-26.5 {Tk_WmCmd procedure, "iconposition" option} unix {
d923 1
a923 1
test unixWm-27.1 {Tk_WmCmd procedure, "iconwindow" option} unix {
d943 1
a943 1
test unixWm-27.3 {Tk_WmCmd procedure, "iconwindow" option} unix {
d946 1
a946 1
test unixWm-27.4 {Tk_WmCmd procedure, "iconwindow" option} unix {
d953 1
a953 1
test unixWm-27.5 {Tk_WmCmd procedure, "iconwindow" option} unix {
d965 1
a965 1
test unixWm-27.6 {Tk_WmCmd procedure, "iconwindow" option, changing icons} unix {
d978 1
a978 1
test unixWm-27.7 {Tk_WmCmd procedure, "iconwindow" option, withdrawing icon} unix {
d1027 1
a1027 1
test unixWm-30.1 {Tk_WmCmd procedure, "overrideredirect" option} unix {
d1030 1
a1030 1
test unixWm-30.2 {Tk_WmCmd procedure, "overrideredirect" option} unix {
d1033 1
a1033 1
test unixWm-30.3 {Tk_WmCmd procedure, "overrideredirect" option} unix {
d1042 1
a1042 1
test unixWm-31.1 {Tk_WmCmd procedure, "positionfrom" option} unix {
d1059 1
a1059 1
test unixWm-31.3 {Tk_WmCmd procedure, "positionfrom" option} unix {
d1063 1
a1063 1
test unixWm-32.1 {Tk_WmCmd procedure, "protocol" option} unix {
d1066 1
a1066 1
test unixWm-32.2 {Tk_WmCmd procedure, "protocol" option} unix {
d1097 1
a1097 1
test unixWm-32.4 {Tk_WmCmd procedure, "protocol" option} unix {
d1106 1
a1106 1
test unixWm-32.5 {Tk_WmCmd procedure, "protocol" option} unix {
d1114 1
a1114 1
test unixWm-33.1 {Tk_WmCmd procedure, "resizable" option} unix {
d1117 1
a1117 1
test unixWm-33.2 {Tk_WmCmd procedure, "resizable" option} unix {
d1120 1
a1120 1
test unixWm-33.3 {Tk_WmCmd procedure, "resizable" option} unix {
d1123 1
a1123 1
test unixWm-33.4 {Tk_WmCmd procedure, "resizable" option} unix {
d1126 1
a1126 1
test unixWm-33.5 {Tk_WmCmd procedure, "resizable" option} unix {
d1129 1
a1129 1
test unixWm-33.6 {Tk_WmCmd procedure, "resizable" option} unix {
d1145 1
a1145 1
test unixWm-34.1 {Tk_WmCmd procedure, "sizefrom" option} unix {
d1162 1
a1162 1
test unixWm-34.3 {Tk_WmCmd procedure, "sizefrom" option} unix {
d1169 1
a1169 1
test unixWm-35.2 {Tk_WmCmd procedure, "state" option} unix {
d1172 1
a1172 1
test unixWm-35.3 {Tk_WmCmd procedure, "state" option} unix {
d1189 1
a1189 1
test unixWm-35.4 {Tk_WmCmd procedure, "state" option} unix {
d1207 1
a1207 1
test unixWm-36.1 {Tk_WmCmd procedure, "title" option} unix {
d1261 1
a1261 1
test unixWm-38.1 {Tk_WmCmd procedure, "withdraw" option} unix {
d1264 1
a1264 1
test unixWm-38.2 {Tk_WmCmd procedure, "withdraw" option} unix {
d1273 1
a1273 1
test unixWm-38.3 {Tk_WmCmd procedure, "withdraw" option} unix {
d1281 1
a1281 1
test unixWm-39.1 {Tk_WmCmd procedure, miscellaneous} unix {
d1288 1
a1288 1
test unixWm-40.1 {Tk_SetGrid procedure, set grid dimensions before turning on grid} {unix nonPortable} {
d1297 1
a1297 1
test unixWm-40.2 {Tk_SetGrid procedure, turning on grid when dimensions already set} unix {
d1309 1
a1309 1
test unixWm-41.1 {ConfigureEvent procedure, internally generated size changes} unix {
d1320 1
a1320 1
test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable testmenubar} unix {
d1345 1
a1345 1
test unixWm-41.3 {ConfigureEvent procedure, synthesized Configure events} unix {
d1356 1
a1356 1
test unixWm-41.4 {ConfigureEvent procedure, synthesized Configure events} unix {
d1371 1
a1371 1
test unixWm-42.1 {WrapperEventProc procedure, map and unmap events} unix {
d1387 1
a1387 1
test unixWm-43.1 {TopLevelReqProc procedure, embedded in same process} unix {
d1405 1
a1405 1
	{unix nonPortable} {
d1420 1
a1420 1
test unixWm-44.1 {UpdateGeometryInfo procedure, width/height computation} unix {
d1430 1
a1430 1
test unixWm-44.2 {UpdateGeometryInfo procedure, width/height computation} unix {
d1441 1
a1441 1
test unixWm-44.3 {UpdateGeometryInfo procedure, width/height computation} unix {
d1452 1
a1452 1
test unixWm-44.4 {UpdateGeometryInfo procedure, width/height computation} unix {
d1462 1
a1462 1
test unixWm-44.5 {UpdateGeometryInfo procedure, negative width} unix {
d1473 1
a1473 1
test unixWm-44.6 {UpdateGeometryInfo procedure, negative height} unix {
d1487 1
a1487 1
test unixWm-44.7 {UpdateGeometryInfo procedure, computing position} unix {
d1496 1
a1496 1
test unixWm-44.8 {UpdateGeometryInfo procedure, computing position} unix {
d1589 1
a1589 1
test unixWm-46.1 {WaitForEvent procedure, use of modal timeout} unix {
d1603 1
a1603 1
test unixWm-47.1 {WaitRestrictProc procedure} {unix nonPortable} {
d1634 1
a1634 1
test unixWm-48.1 {ParseGeometry procedure} unix {
d1639 1
a1639 1
test unixWm-48.2 {ParseGeometry procedure} unix {
d1642 1
a1642 1
test unixWm-48.3 {ParseGeometry procedure} unix {
d1645 1
a1645 1
test unixWm-48.4 {ParseGeometry procedure} unix {
d1648 1
a1648 1
test unixWm-48.5 {ParseGeometry procedure} unix {
d1651 1
a1651 1
test unixWm-48.6 {ParseGeometry procedure} unix {
d1654 1
a1654 1
test unixWm-48.7 {ParseGeometry procedure} unix {
d1657 1
a1657 1
test unixWm-48.8 {ParseGeometry procedure} unix {
d1660 1
a1660 1
test unixWm-48.9 {ParseGeometry procedure} unix {
d1663 1
a1663 1
test unixWm-48.10 {ParseGeometry procedure} unix {
d1666 1
a1666 1
test unixWm-48.11 {ParseGeometry procedure} unix {
d1669 1
a1669 1
test unixWm-48.12 {ParseGeometry procedure} unix {
d1672 1
a1672 1
test unixWm-48.13 {ParseGeometry procedure, resize causes window to move} unix {
d1687 1
a1687 1
test unixWm-49.1 {Tk_GetRootCoords procedure} unix {
d1719 1
a1719 1
test unixWm-50.1 {Tk_CoordsToWindow procedure, finding a toplevel, x-coords} unix {
d1739 1
a1739 1
test unixWm-50.2 {Tk_CoordsToWindow procedure, finding a toplevel, y-coords and overrideredirect} unix {
d1789 1
a1789 1
test unixWm-50.4 {Tk_CoordsToWindow procedure, window in other application} unix {
d1825 1
a1825 1
test unixWm-50.6 {Tk_CoordsToWindow procedure, embedding within one app.} unix {
d1842 1
a1842 1
test unixWm-50.7 {Tk_CoordsToWindow procedure, more basics} unix {
d1859 1
a1859 1
test unixWm-50.8 {Tk_CoordsToWindow procedure, more basics} unix {
d1876 1
a1876 1
test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} unix {
d1890 1
a1890 1
test unixWm-50.10 {Tk_CoordsToWindow procedure, unmapped windows} unix {
d1908 1
a1908 1
test unixWm-51.1 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} {
d1914 1
a1914 1
test unixWm-51.2 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} {
d1920 1
a1920 1
test unixWm-51.3 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} {
d1933 1
a1933 1
test unixWm-51.4 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} {
d1943 1
a1943 1
test unixWm-51.5 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} {
d1960 1
a1960 1
test unixWm-51.6 {TkWmRestackToplevel procedure, window to be stacked isn't mapped} unix {
d1970 1
a1970 1
test unixWm-51.7 {TkWmRestackToplevel procedure, other window isn't mapped} unix {
d1984 1
a1984 1
test unixWm-51.8 {TkWmRestackToplevel procedure, overrideredirect windows} unix {
d2009 1
a2009 1
test unixWm-51.9 {TkWmRestackToplevel procedure, other window overrideredirect} unix {
d2031 1
a2031 1
test unixWm-51.10 {TkWmRestackToplevel procedure, don't move window that's already in the right place} unix {
d2037 1
a2037 1
test unixWm-51.11 {TkWmRestackToplevel procedure, don't move window that's already in the right place} unix {
d2042 1
a2042 1
test unixWm-51.12 {TkWmRestackToplevel procedure, don't move window that's already in the right place} unix {
d2047 1
a2047 1
test unixWm-51.13 {TkWmRestackToplevel procedure, don't move window that's already in the right place} unix {
d2053 1
a2053 1
test unixWm-52.1 {TkWmAddToColormapWindows procedure} unix {
d2060 1
a2060 1
test unixWm-52.2 {TkWmAddToColormapWindows procedure} unix {
d2069 1
a2069 1
test unixWm-52.3 {TkWmAddToColormapWindows procedure} unix {
d2080 1
a2080 1
test unixWm-52.4 {TkWmAddToColormapWindows procedure} unix {
d2094 1
a2094 1
test unixWm-53.1 {TkWmRemoveFromColormapWindows procedure} unix {
d2106 1
a2106 1
test unixWm-53.2 {TkWmRemoveFromColormapWindows procedure} unix {
d2342 1
a2342 1
test unixWm-59.1 {exit processing} unix {
d2355 1
a2355 1
test unixWm-59.2 {exit processing} unix {
d2372 1
a2372 1
test unixWm-59.3 {exit processing} unix {
@


1.29.2.2
log
@        * tests/unixWm.test (unixWm-41.2): Corrected typo in 2003-03-13
        commit.  Thanks Larry Virden.  [Bug 705567]
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.29.2.1 2003/03/13 19:33:49 dgp Exp $
d1320 1
a1320 1
test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable testmenubar} {
@


1.29.2.3
log
@	Backport of 8.5 wm iconphoto that added support for Tk photo
	* generic/tkInt.h (TkDisplay):    images as titlebar icons. TIP #159
	* win/tkWinWm.c (WmIconphotoCmd): wm iconphoto ?-default? image1 ...
	* macosx/tkMacOSXWm.c (WmIconphotoCmd): Implemented for Win/Unix,
	* unix/tkUnixWm.c (WmIconphotoCmd):     stubbed out for OS X.
	* tests/wm.test, tests/unixWm.test, tests/winWm.test: [Bug 815751]
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.29.2.2 2003/03/18 16:19:10 dgp Exp $
d885 1
a885 1
} {1 {ambiguous option "icon": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d1283 1
a1283 1
} {1 {bad option "unknown": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
a2406 13
test unixWm-61.1 {Tk_WmCmd procedure, "iconphoto" option} unix {
    list [catch {wm iconph .} msg] $msg
} {1 {wrong # args: should be "wm iconphoto window ?-default? image1 ?image2 ...?"}}
test unixWm-61.2 {Tk_WmCmd procedure, "iconphoto" option} unix {
    destroy .t
    toplevel .t
    image create photo blank16 -width 16 -height 16
    image create photo blank32 -width 32 -height 32
    # This should just make blank icons for the window
    wm iconphoto .t blank16 blank32
    image delete blank16 blank32
} {}

@


1.29.2.4
log
@unix/tkUnixWm.c: Sync with CVS HEAD (r1.47):
Fixes: #959973 "wm title bug" (support Unicode titles)
Fixes: #742882 "Potential division by zero in gridded wm geometry"
Use Tcl_GetTime instead of TclpGetTime [#874745]
Use Tcl_Panic() instead of "panic" [#865264]
Fixes: #632816 "cannot remove transient"
Fixes: #568861 "Fix for wm minsize and maxsize commands"

tests/unixWm.test, tests/wm.test: Updated test suite for
#632816 (unixWm-37.3, unixWm-37.4, wm-grid-1.11, wm-grid-1.12)
and #742882 (unixWm-20.9, unixWm-20.11).
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.29.2.3 2004/10/05 22:27:27 hobbs Exp $
d736 1
a736 1
} {1 {widthInc can't be <= 0}}
d742 1
a742 1
} {1 {heightInc can't be <= 0}}
d1235 1
a1235 1
} {{} {} .t 0 {} {}}
d1246 1
a1246 1
} {{} {}}
@


1.29.2.5
log
@TIP #359: Extended Window Manager Hints support for 8.4
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.29.2.4 2005/01/14 21:09:47 jenglish Exp $
d2400 1
a2400 1
} {-type {}}
d2405 1
a2405 1
} {1 {wrong # args: should be "wm attributes window ?-type list?"}}
a2419 38
test unixWm-62.0 {wm attributes -type void} unix {
    destroy .t
    toplevel .t
    set r [list [catch {wm attributes .t -type {}} err] $err]
    destroy .t
    set r
} {0 {}}
test unixWm-62.1 {wm attributes -type name} unix {
    destroy .t
    toplevel .t
    set r [list [catch {wm attributes .t -type dialog} err] $err]
    destroy .t
    set r
} {0 {}}
test unixWm-62.1 {wm attributes -type name} unix {
    destroy .t
    toplevel .t
    tkwait visibility .t
    set r [list [catch {wm attributes .t -type dialog} err] $err]
    destroy .t
    set r
} {0 {}}
test unixWm-62.2 {wm attributes -type list} unix {
    destroy .t
    toplevel .t
    set r [list [catch {wm attributes .t -type {xyzzy dialog}} err] $err]
    destroy .t
    set r
} {0 {}}
test unixWm-62.2 {wm attributes -type list} unix {
    destroy .t
    toplevel .t
    tkwait visibility .t
    set r [list [catch {wm attributes .t -type {xyzzy dialog}} err] $err]
    destroy .t
    set r
} {0 {}}

@


1.28
log
@        * tests/unixWm.test (unixWm-50.3):  Constrained test that hangs
        on Windows.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.27 2002/08/08 21:02:16 dgp Exp $
d1977 1
d1981 1
@


1.27
log
@        * tests/unixWm.test:  Corrected packaging of unixWm-50.3 so that
        [setupbg] and [cleanupbg] always balance, no matter what tests
        are skipped.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.26 2002/07/25 21:35:23 pspjuth Exp $
d1763 1
a1763 1
} -setup {
@


1.26
log
@Objectifed wm. [Patch #564521]
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.25 2002/07/15 18:10:47 dgp Exp $
d12 1
a12 1
package require tcltest 2.1
d1761 3
a1763 1
test unixWm-50.3 {Tk_CoordsToWindow procedure, finding a toplevel with embedding} {
d1771 1
d1786 3
a1788 2
} {{} .x .t .t.f}
cleanupbg
@


1.25
log
@	* Some tests needed "unix" constraint.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.24 2002/07/15 16:56:32 dgp Exp $
d278 1
a278 1
} {1 {wrong # arguments: must be "wm iconwindow window ?pathName?"}}
d451 1
a451 1
    list [catch {wm foo} msg] $msg
d454 1
a454 1
    list [catch {wm foo bogus} msg] $msg
d471 1
a471 1
} {1 {wrong # arguments: must be "wm aspect window ?minNumer minDenom maxNumer maxDenom?"}}
d474 1
a474 1
} {1 {wrong # arguments: must be "wm aspect window ?minNumer minDenom maxNumer maxDenom?"}}
d510 1
a510 1
} {1 {wrong # arguments: must be "wm client window ?name?"}}
d532 1
a532 1
} {1 {wrong # arguments: must be "wm colormapwindows window ?windowList?"}}
d587 1
a587 1
} {1 {wrong # arguments: must be "wm command window ?value?"}}
d590 1
a590 1
} {1 {wrong # arguments: must be "wm command window ?value?"}}
d618 1
a618 1
} {1 {wrong # arguments: must be "wm deiconify window"}}
d637 1
a637 1
} {1 {wrong # arguments: must be "wm focusmodel window ?active|passive?"}}
d653 1
a653 1
} {1 {wrong # arguments: must be "wm frame window"}}
d670 1
a670 1
} {1 {wrong # arguments: must be "wm geometry window ?newGeometry?"}}
d707 1
a707 1
} {1 {wrong # arguments: must be "wm grid window ?baseWidth baseHeight widthInc heightInc?"}}
d710 1
a710 1
} {1 {wrong # arguments: must be "wm grid window ?baseWidth baseHeight widthInc heightInc?"}}
d752 1
a752 1
} {1 {wrong # arguments: must be "wm group window ?pathName?"}}
d794 1
a794 1
} {1 {wrong # arguments: must be "wm iconbitmap window ?bitmap?"}}
d813 1
a813 1
} {1 {wrong # arguments: must be "wm iconify window"}}
d866 1
a866 1
} {1 {wrong # arguments: must be "wm iconmask window ?bitmap?"}}
d885 1
a885 1
} {1 {unknown or ambiguous option "icon": must be aspect, attributes, client, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d888 1
a888 1
} {1 {wrong # arguments: must be "wm iconname window ?newName?"}}
d900 1
a900 1
} {1 {wrong # arguments: must be "wm iconposition window ?x y?"}}
d903 1
a903 1
} {1 {wrong # arguments: must be "wm iconposition window ?x y?"}}
d925 1
a925 1
} {1 {wrong # arguments: must be "wm iconwindow window ?pathName?"}}
d1029 1
a1029 1
} {1 {wrong # arguments: must be "wm overrideredirect window ?boolean?"}}
d1044 1
a1044 1
} {1 {wrong # arguments: must be "wm positionfrom window ?user/program?"}}
d1065 1
a1065 1
} {1 {wrong # arguments: must be "wm protocol window ?name? ?command?"}}
d1116 1
a1116 1
} {1 {wrong # arguments: must be "wm resizable window ?width height?"}}
d1119 1
a1119 1
} {1 {wrong # arguments: must be "wm resizable window ?width height?"}}
d1147 1
a1147 1
} {1 {wrong # arguments: must be "wm sizefrom window ?user|program?"}}
d1168 1
a1168 1
} {1 {bad argument "1": must be normal, iconic or withdrawn}}
d1171 1
a1171 1
} {1 {wrong # arguments: must be "wm state window ?state?"}}
d1209 1
a1209 1
} {1 {wrong # arguments: must be "wm title window ?newTitle?"}}
d1263 1
a1263 1
} {1 {wrong # arguments: must be "wm withdraw window"}}
d1283 1
a1283 1
} {1 {unknown or ambiguous option "unknown": must be aspect, attributes, client, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d2399 1
a2399 1
} {1 {wrong # arguments: must be "wm attributes window"}}
@


1.24
log
@        * Fixes for [Bug 581627].
        * generic/tkTest.c:             Test commands not supported on non-Unix
          platforms should not be defined there in the first place.
        * tests/constraints.tcl:        Fixed "secureserver" constraint.
        * tests/unixWm.test:            Some tests needed "unix" constraint.
        * win/tkWinWm.c:                Typo in error message.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.23 2002/07/13 21:52:34 dgp Exp $
d2114 1
a2114 1
test unixWm-54.1 {TkpMakeMenuWindow procedure, setting save_under} {
d2131 1
a2131 1
test unixWm-54.2 {TkpMakeMenuWindow procedure, setting override_redirect} {
@


1.23
log
@	* Converted more files to tcltest and factored out common code.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.22 2002/07/13 20:28:36 dgp Exp $
d792 1
a792 1
test unixWm-22.1 {Tk_WmCmd procedure, "iconbitmap" option} {
d1166 1
a1166 1
test unixWm-35.1 {Tk_WmCmd procedure, "state" option} {
d2390 1
a2390 1
test unixWm-60.1 {wm attributes} {
d2395 1
a2395 1
test unixWm-60.2 {wm attributes} {
@


1.22
log
@	* Converted more files to tcltest and factored out common code.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.21 2002/07/12 21:08:49 dgp Exp $
a378 2

testConstraint testwrapper [llength [info commands testwrapper]]
@


1.21
log
@	* Converted several files in the Tk test suite for testing by
	tcltest 2.1.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.20 2002/07/12 13:41:00 dgp Exp $
d13 1
a13 1
namespace import -force tcltest::test
d15 4
a18 1
namespace import -force tcltest::configure
a21 4
configure -testdir [file join [pwd] [file dirname [info script]]]
configure -loadfile [file join [testsDirectory] constraints.tcl]
tcltest::loadTestedCommands
eval configure $argv
d32 1
a32 3
    foreach i [winfo child .] {
	destroy $i
    }
d1719 1
a1719 3
foreach w [winfo children .] {
    catch {destroy $w}
}
d1722 1
a1722 1
    eval destroy [winfo children .]
d1742 1
a1742 1
    eval destroy [winfo children .]
d1764 1
a1764 1
    eval destroy [winfo children .]
d1802 1
a1802 1
    eval destroy [winfo children .]
d1824 1
a1824 1
    eval destroy [winfo children .]
d1900 1
a1900 1
eval destroy [winfo children .]
d1957 1
a1957 3
foreach w [winfo children .] {
    catch {destroy $w}
}
@


1.20
log
@	* Converted several files in the Tk test suite for testing by
	tcltest 2.1.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.19 2002/06/22 10:13:26 hobbs Exp $
d17 2
a23 6
if {$tcl_platform(platform) != "unix"} {
    puts "skipping: Unix only tests..."
    ::tcltest::cleanupTests
    return
}

d46 1
a46 1
    test unixWm-1.$i {initial window position} {
d71 1
a71 1
    test unixWm-2.$i {moving window while mapped} {
d83 1
a83 1
    test unixWm-3.$i {moving window while iconified} {
d98 1
a98 1
    test unixWm-4.$i {moving window while withdrawn} {
d109 1
a109 1
test unixWm-5.1 {compounded state changes} {nonPortable} {
d118 1
a118 1
test unixWm-5.2 {compounded state changes} {nonPortable} {
d128 1
a128 1
test unixWm-5.3 {compounded state changes} {nonPortable} {
d139 1
a139 1
test unixWm-5.4 {compounded state changes} {nonPortable} {
d149 1
a149 1
test unixWm-5.5 {compounded state changes} {nonPortable} {
d158 1
a158 1
test unixWm-5.6 {compounded state changes} {nonPortable} {
d168 1
a168 1
test unixWm-5.7 {compounded state changes} {nonPortable} {
d183 1
a183 1
test unixWm-6.1 {size changes} {
d188 1
a188 1
test unixWm-6.2 {size changes} {
d194 1
a194 1
test unixWm-6.3 {size changes} {
d201 1
a201 1
test unixWm-6.4 {size changes} {nonPortable userInteraction} {
d228 1
a228 1
test unixWm-6.5 {window initially iconic} {nonPortable} {
d248 1
a248 1
test unixWm-7.1 {override_redirect and Tk_MoveTopLevelWindow} {
d253 1
a253 1
test unixWm-7.2 {override_redirect and Tk_MoveTopLevelWindow} {
d257 1
a257 1
test unixWm-7.3 {override_redirect and Tk_MoveTopLevelWindow} {
d263 1
a263 1
test unixWm-8.1 {icon windows} {
d272 1
a272 1
test unixWm-8.2 {icon windows} {
d277 1
a277 1
test unixWm-8.3 {icon windows} {
d282 1
a282 1
test unixWm-8.4 {icon windows} {
d299 1
a299 1
test unixWm-8.5 {icon windows} {
d304 1
a304 1
test unixWm-8.6 {icon windows} {
d310 1
a310 1
test unixWm-8.7 {icon windows} {
d323 1
a323 1
test unixWm-8.8 {icon windows} {
d337 1
a337 1
test unixWm-8.9 {icon windows} {nonPortable} {
d358 1
a358 1
test unixWm-8.10.1 {test for memory leaks} {
d369 1
a369 1
test unixWm-8.10.2 {test for memory leaks} {
d383 1
a383 6
if {[string compare testwrapper [info commands testwrapper]] != 0} {
    puts "This application hasn't been compiled with the testwrapper command,"
    puts "therefore I am skipping all of these tests."
    ::tcltest::cleanupTests
    return
}
d385 1
a385 1
test unixWm-9.1 {TkWmMapWindow procedure, client property} {unixOnly} {
d393 1
a393 1
test unixWm-9.2 {TkWmMapWindow procedure, command property} {unixOnly} {
d427 2
d437 1
a437 1
test unixWm-10.2 {TkWmDeadWindow procedure, destroying menubar} {unixOnly} {
d516 1
a516 1
test unixWm-13.2 {Tk_WmCmd procedure, "client" option} {unixOnly} {
d596 1
a596 1
test unixWm-15.3 {Tk_WmCmd procedure, "command" option} {unixOnly} {
d761 1
a761 1
test unixWm-21.3 {Tk_WmCmd procedure, "group" option} {unixOnly} {
d773 1
a773 1
test unixWm-21.4 {Tk_WmCmd procedure, "group" option, make window exist} {unixOnly} {
d783 1
a783 1
test unixWm-21.5 {Tk_WmCmd procedure, "group" option, create leader wrapper} {unixOnly} {
d800 1
a800 1
test unixWm-22.2 {Tk_WmCmd procedure, "iconbitmap" option} {unixOnly} {
d872 1
a872 1
test unixWm-24.2 {Tk_WmCmd procedure, "iconmask" option} {unixOnly} {
d894 1
a894 1
test unixWm-25.3 {Tk_WmCmd procedure, "iconname" option} {unixOnly} {
d909 1
a909 1
test unixWm-26.3 {Tk_WmCmd procedure, "iconposition" option} {unixOnly} {
d931 1
a931 1
test unixWm-27.2 {Tk_WmCmd procedure, "iconwindow" option} {unixOnly} {
d1050 1
a1050 1
test unixWm-31.2 {Tk_WmCmd procedure, "positionfrom" option} {unixOnly} {
d1079 1
a1079 1
test unixWm-32.3 {Tk_WmCmd procedure, "protocol" option} {unixOnly} {
d1153 1
a1153 1
test unixWm-34.2 {Tk_WmCmd procedure, "sizefrom" option} {unixOnly} {
d1215 1
a1215 1
test unixWm-36.2 {Tk_WmCmd procedure, "title" option} {unixOnly} {
d1224 1
a1224 1
test unixWm-37.3 {Tk_WmCmd procedure, "transient" option} {unixOnly} {
d1241 1
a1241 1
test unixWm-37.4 {TkWmDeadWindow, destroy on master should clear transient} {unixOnly} {
d1252 1
a1252 1
test unixWm-37.5 {Tk_WmCmd procedure, "transient" option, create master wrapper} {unixOnly} {
d1325 1
a1325 1
test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable} {
d1509 1
a1509 1
test unixWm-44.9 {UpdateGeometryInfo procedure, updating fixed dimensions} {unixOnly} {
d1521 1
a1521 1
test unixWm-44.10 {UpdateGeometryInfo procedure, menubar changing} {
d1536 1
a1536 1
test unixWm-45.1 {UpdateSizeHints procedure, grid information} {unixOnly} {
d1549 1
a1549 1
test unixWm-45.2 {UpdateSizeHints procedure} {unixOnly} {
d1561 1
a1561 1
test unixWm-45.3 {UpdateSizeHints procedure, grid with menu} {
d1577 1
a1577 1
test unixWm-45.4 {UpdateSizeHints procedure, not resizable with menu} {
d1704 1
a1704 1
test unixWm-49.2 {Tk_GetRootCoords procedure, menubars} {unixOnly} {
d1806 1
a1806 1
test unixWm-50.5 {Tk_CoordsToWindow procedure, handling menubars} {unixOnly} {
d2155 1
a2155 1
test unixWm-55.1 {TkUnixSetMenubar procedure} {unixOnly} {
d2167 1
a2167 1
test unixWm-55.2 {TkUnixSetMenubar procedure, removing menubar} {unixOnly} {
d2186 1
a2186 1
test unixWm-55.3 {TkUnixSetMenubar procedure, removing geometry manager} {unixOnly} {
d2203 1
a2203 1
test unixWm-55.4 {TkUnixSetMenubar procedure, toplevel not yet created} {unixOnly} {
d2214 1
a2214 1
test unixWm-55.5 {TkUnixSetMenubar procedure, changing menubar} {unixOnly} {
d2233 1
a2233 1
test unixWm-55.6 {TkUnixSetMenubar procedure, changing menubar to self} {unixOnly} {
d2246 1
a2246 1
test unixWm-55.7 {TkUnixSetMenubar procedure, unsetting event handler} {unixOnly} {
d2266 1
a2266 1
test unixWm-56.1 {MenubarDestroyProc procedure} {unixOnly} {
d2281 1
a2281 1
test unixWm-57.1 {MenubarReqProc procedure} {unixOnly} {
d2296 1
a2296 1
test unixWm-57.2 {MenubarReqProc procedure} {unixOnly} {
d2312 1
a2312 1
test unixWm-58.1 {UpdateCommand procedure, DString gets reallocated} {unixOnly} {
d2346 1
a2346 3
    catch {removeFile script}
    set fd [open script w]
    puts $fd {
d2349 2
a2350 3
    }
    close $fd
    if {[catch {exec [interpreter] script -geometry 10x10+0+0} msg]} {
d2355 1
d2359 1
a2359 3
    catch {removeFile script}
    set fd [open script w]
    puts $fd {
d2366 2
a2367 3
    }
    close $fd
    if {[catch {exec [interpreter] script -geometry 10x10+0+0} msg]} {
d2372 1
d2376 1
a2376 3
    catch {removeFile script}
    set fd [open script w]
    puts $fd {
d2389 2
a2390 3
    }
    close $fd
    if {[catch {exec [interpreter] script -geometry 10x10+0+0} msg]} {
d2395 1
a2411 1
catch {removeFile script}
@


1.19
log
@	* doc/wm.n:                   TIP #95 Windows implementation and
	* mac/tkMacWm.c (Tk_WmCmd):   docs with mac and unix stubs.
	* unix/tkUnixWm.c (Tk_WmCmd):
	* win/tkWinWm.c (Tk_WmCmd):
	* tests/unixWm.test:
	* tests/winWm.test: more wm attr tests will be needed.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.18 2002/06/14 22:52:04 hobbs Exp $
d12 9
a20 3
if {[lsearch [namespace children] ::tcltest] == -1} {
    source [file join [pwd] [file dirname [info script]] defs.tcl]
}
d2360 1
a2360 1
    if {[catch {exec $::tcltest::tktest script -geometry 10x10+0+0} msg]} {
d2379 1
a2379 1
    if {[catch {exec $::tcltest::tktest script -geometry 10x10+0+0} msg]} {
d2404 1
a2404 1
    if {[catch {exec $::tcltest::tktest script -geometry 10x10+0+0} msg]} {
@


1.18
log
@corrected test numbering
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.17 2002/06/13 21:35:09 mdejong Exp $
d356 1
a356 1
test unixWm-59.1 {test for memory leaks} {
d367 1
a367 1
test unixWm-59.2 {test for memory leaks} {
d891 1
a891 1
} {1 {unknown or ambiguous option "icon": must be aspect, client, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d1289 1
a1289 1
} {1 {unknown or ambiguous option "unknown": must be aspect, client, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d2406 10
a2421 13













@


1.17
log
@	* tests/unixWm.test:
	* tests/wm.test: Move wm minsize and wm maxsize
	usage tests into the cross platform wm tests.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.16 2002/06/12 19:02:49 mdejong Exp $
d2346 1
a2346 1
test unixWm-58.1 {exit processing} {
d2361 1
a2361 1
test unixWm-58.2 {exit processing} {
d2380 1
a2380 1
test unixWm-58.3 {exit processing} {
@


1.16
log
@	* changes: Add note about new transient behavior.
	* tests/unixWm.test: Check that the WM_TRANSIENT_FOR
	property for a transient window is being cleared
	when the master is destroyed.
	* tests/wm.test: Source defs.tcl instead of using
	tcltest to match the rest of Tk's test files.
	Add new tests that ensure that a transient's state
	mirrors the state of the master.
	* unix/tkUnixWm.c (WmInfo, TkWmNewWindow, TkWmMapWindow,
	TkWmDeadWindow, Tk_WmCmd, WmWaitMapProc): Add numTransients
	member to WmInfo structure. Keep state of master and
	transient in sync using a callback that tracks MapNotify
	and UnmapNotify events. When the master is mapped, map
	the transient. When the master is unmapped or iconified,
	withdraw the transient.
	* win/tkWinWm.c (TkWmMapWindow, TkpWmSetState,
	TkWmDeadWindow, Tk_WmCmd, WmWaitVisibilityOrMapProc):
	Keep state of master and transient in sync using a
	callback that tracks MapNotify and UnmapNotify events.
	Move masterPtr check from TkpWmSetState into TkWmMapWindow
	to deal with WM_NEVER_MAPPED transients. Cleanup
	numTransients and the callback in TkWmDeadWindow.
	Cleanup numTransients and the callback only after
	deleting a master in wm transient command to avoid
	deleting the callback when an error is raised.
	Add support for MapNotify and UnmapNotify events
	to the master callback.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.15 2002/05/24 09:50:11 mdejong Exp $
d997 1
a997 10
test unixWm-28.1 {Tk_WmCmd procedure, "maxsize" option} {
    list [catch {wm maxsize} msg]  $msg
} {1 {wrong # args: should be "wm option window ?arg ...?"}}
test unixWm-28.2 {Tk_WmCmd procedure, "maxsize" option} {
    list [catch {wm maxsize . a} msg]  $msg
} {1 {wrong # arguments: must be "wm maxsize window ?width height?"}}
test unixWm-28.3 {Tk_WmCmd procedure, "maxsize" option} {
    list [catch {wm maxsize . a b c} msg]  $msg
} {1 {wrong # arguments: must be "wm maxsize window ?width height?"}}
test unixWm-28.4 {Tk_WmCmd procedure, "maxsize" option} {nonPortable} {
d1000 2
a1001 11
test unixWm-28.5 {Tk_WmCmd procedure, "maxsize" option} {
    list [catch {wm maxsize . x 100} msg]  $msg
} {1 {expected integer but got "x"}}
test unixWm-28.6 {Tk_WmCmd procedure, "maxsize" option} {
    list [catch {wm maxsize . 100 bogus} msg]  $msg
} {1 {expected integer but got "bogus"}}
test unixWm-28.7 {Tk_WmCmd procedure, "maxsize" option} {
    wm maxsize .t 200 150
    wm maxsize .t
} {200 150}
test unixWm-28.8 {Tk_WmCmd procedure, "maxsize" option} {nonPortable} {
d1017 1
a1017 23
test unixWm-29.1 {Tk_WmCmd procedure, "minsize" option} {
    list [catch {wm minsize} msg]  $msg
} {1 {wrong # args: should be "wm option window ?arg ...?"}}
test unixWm-29.2 {Tk_WmCmd procedure, "minsize" option} {
    list [catch {wm minsize . a} msg]  $msg
} {1 {wrong # arguments: must be "wm minsize window ?width height?"}}
test unixWm-29.3 {Tk_WmCmd procedure, "minsize" option} {
    list [catch {wm minsize . a b c} msg]  $msg
} {1 {wrong # arguments: must be "wm minsize window ?width height?"}}
test unixWm-29.4 {Tk_WmCmd procedure, "minsize" option} {
    wm minsize .t
}  {1 1}
test unixWm-29.5 {Tk_WmCmd procedure, "minsize" option} {
    list [catch {wm minsize . x 100} msg]  $msg
} {1 {expected integer but got "x"}}
test unixWm-29.6 {Tk_WmCmd procedure, "minsize" option} {
    list [catch {wm minsize . 100 bogus} msg]  $msg
} {1 {expected integer but got "bogus"}}
test unixWm-29.7 {Tk_WmCmd procedure, "minsize" option} {
    wm minsize .t 200 150
    wm minsize .t
} {200 150}
test unixWm-29.8 {Tk_WmCmd procedure, "minsize" option} {nonPortable} {
@


1.15
log
@	* mac/tkMacWm.c (Tk_WmCmd):
	* tests/unixWm.test: Move wm transient checks over
	to wm.test so they will be run on all systems.
	* tests/wm.test: Add tests to check for error when
	an iconwindow is passed to the wm transient command.
	* unix/tkUnixWm.c (Tk_WmCmd):
	* win/tkWinWm.c (Tk_WmCmd): Raise an error if one
	of the windows passed to the wm transient command
	is an iconwindow for another toplevel.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.14 2001/12/04 03:07:43 mdejong Exp $
d1282 12
a1293 1
test unixWm-37.4 {Tk_WmCmd procedure, "transient" option, create master wrapper} {unixOnly} {
@


1.14
log
@	Add TK patch 481148 to implement TIP 74, the
	wm stackorder command.

	* doc/winfo.n: Update documentation for the winfo
	children command to indicate that top-level windows
	are not returned in stacking order.
	* doc/wm.n: Add documentation for wm stackorder.
	* generic/tkInt.decls (TkWmStackorderToplevel):
	Add decl for new function.
	* generic/tkIntDecls.h: Regen.
	* generic/tkStubInit.c: Regen.
	* tests/unixWm.test: Add stackorder command to test
	for wm command usage message.
	* tests/wm.test: Add new set of tests for generic
	window manager methods.
	* unix/tkUnixWm.c (Tk_WmCmd,
	TkWmStackorderToplevelWrapperMap,
	TkWmStackorderToplevel): Add unix implementation of
	new wm stackorder command.
	* win/tkWinWm.c (Tk_WmCmd,
	TkWmStackorderToplevelEnumProc,
	TkWmStackorderToplevelWrapperMap,
	TkWmStackorderToplevel): Add windows implementation
	of new wm stackorder command.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.13 2001/03/28 17:27:10 dgp Exp $
a1264 6
test unixWm-37.1 {Tk_WmCmd procedure, "transient" option} {
    list [catch {wm transient .t 1 2} msg]  $msg
} {1 {wrong # arguments: must be "wm transient window ?master?"}}
test unixWm-37.2 {Tk_WmCmd procedure, "transient" option} {
    list [catch {wm transient .t foo} msg]  $msg
} {1 {bad window path name "foo"}}
@


1.13
log
@Replaced all [load {} tk] in Tk test suite with [load {} Tk].
[Bug 220940, Patch 411952]
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.12 2000/03/29 00:09:07 ericm Exp $
d891 1
a891 1
} {1 {unknown or ambiguous option "icon": must be aspect, client, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, state, title, transient, or withdraw}}
d1324 1
a1324 1
} {1 {unknown or ambiguous option "unknown": must be aspect, client, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, state, title, transient, or withdraw}}
@


1.13.2.1
log
@First checkin of support for Tk on Mac OS X.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id$
d1835 1
a1835 1
    load {} tk slave
@


1.13.2.2
log
@Merge with current TOT
Added support for the wm stackorder command
Fixed crash when selecting Menu items in the Application menu that we didn't
put there.
Added first bits of the use of CG for low-level drawing.  The line-drawing works,
the rest doesn't yet.  You have to set the file static useCGDrawing to 1 and
rebuild to activate this code.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.13.2.1 2001/10/15 09:22:00 wolfsuit Exp $
d891 1
a891 1
} {1 {unknown or ambiguous option "icon": must be aspect, client, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d1324 1
a1324 1
} {1 {unknown or ambiguous option "unknown": must be aspect, client, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
@


1.13.2.3
log
@Merging with TOT as of 06/09/2002.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id$
d1265 6
d1835 1
a1835 1
    load {} Tk slave
@


1.13.2.4
log
@merged with trunk at tag macosx-8-4-merge-2002-08-20-trunk
@
text
@d12 9
a20 10
package require tcltest 2.2
namespace import -force tcltest::configure
namespace import -force tcltest::testsDirectory
configure -testdir [file join [pwd] [file dirname [info script]]]
configure -loadfile [file join [testsDirectory] constraints.tcl]
tcltest::loadTestedCommands

namespace import -force tcltest::interpreter
namespace import -force tcltest::makeFile
namespace import -force tcltest::removeFile
d31 3
a33 1
    deleteWindows
d44 1
a44 1
    test unixWm-1.$i {initial window position} unix {
d69 1
a69 1
    test unixWm-2.$i {moving window while mapped} unix {
d81 1
a81 1
    test unixWm-3.$i {moving window while iconified} unix {
d96 1
a96 1
    test unixWm-4.$i {moving window while withdrawn} unix {
d107 1
a107 1
test unixWm-5.1 {compounded state changes} {unix nonPortable} {
d116 1
a116 1
test unixWm-5.2 {compounded state changes} {unix nonPortable} {
d126 1
a126 1
test unixWm-5.3 {compounded state changes} {unix nonPortable} {
d137 1
a137 1
test unixWm-5.4 {compounded state changes} {unix nonPortable} {
d147 1
a147 1
test unixWm-5.5 {compounded state changes} {unix nonPortable} {
d156 1
a156 1
test unixWm-5.6 {compounded state changes} {unix nonPortable} {
d166 1
a166 1
test unixWm-5.7 {compounded state changes} {unix nonPortable} {
d181 1
a181 1
test unixWm-6.1 {size changes} unix {
d186 1
a186 1
test unixWm-6.2 {size changes} unix {
d192 1
a192 1
test unixWm-6.3 {size changes} unix {
d199 1
a199 1
test unixWm-6.4 {size changes} {unix nonPortable userInteraction} {
d226 1
a226 1
test unixWm-6.5 {window initially iconic} {unix nonPortable} {
d246 1
a246 1
test unixWm-7.1 {override_redirect and Tk_MoveTopLevelWindow} unix {
d251 1
a251 1
test unixWm-7.2 {override_redirect and Tk_MoveTopLevelWindow} unix {
d255 1
a255 1
test unixWm-7.3 {override_redirect and Tk_MoveTopLevelWindow} unix {
d261 1
a261 1
test unixWm-8.1 {icon windows} unix {
d270 1
a270 1
test unixWm-8.2 {icon windows} unix {
d275 1
a275 1
test unixWm-8.3 {icon windows} unix {
d279 2
a280 2
} {1 {wrong # args: should be "wm iconwindow window ?pathName?"}}
test unixWm-8.4 {icon windows} unix {
d297 1
a297 1
test unixWm-8.5 {icon windows} unix {
d302 1
a302 1
test unixWm-8.6 {icon windows} unix {
d308 1
a308 1
test unixWm-8.7 {icon windows} unix {
d321 1
a321 1
test unixWm-8.8 {icon windows} unix {
d335 1
a335 1
test unixWm-8.9 {icon windows} {unix nonPortable} {
d356 1
a356 1
test unixWm-8.10.1 {test for memory leaks} unix {
d367 1
a367 1
test unixWm-8.10.2 {test for memory leaks} unix {
d381 8
a388 1
test unixWm-9.1 {TkWmMapWindow procedure, client property} {unix testwrapper} {
d396 1
a396 1
test unixWm-9.2 {TkWmMapWindow procedure, command property} {unix testwrapper} {
a429 2
testConstraint testmenubar [llength [info commands testmenubar]]

d438 1
a438 1
test unixWm-10.2 {TkWmDeadWindow procedure, destroying menubar} {unix testmenubar} {
d457 1
a457 1
    list [catch {wm aspect} msg] $msg
d460 1
a460 1
    list [catch {wm iconify bogus} msg] $msg
d477 1
a477 1
} {1 {wrong # args: should be "wm aspect window ?minNumer minDenom maxNumer maxDenom?"}}
d480 1
a480 1
} {1 {wrong # args: should be "wm aspect window ?minNumer minDenom maxNumer maxDenom?"}}
d516 2
a517 2
} {1 {wrong # args: should be "wm client window ?name?"}}
test unixWm-13.2 {Tk_WmCmd procedure, "client" option} {unix testwrapper} {
d538 1
a538 1
} {1 {wrong # args: should be "wm colormapwindows window ?windowList?"}}
d593 1
a593 1
} {1 {wrong # args: should be "wm command window ?value?"}}
d596 2
a597 2
} {1 {wrong # args: should be "wm command window ?value?"}}
test unixWm-15.3 {Tk_WmCmd procedure, "command" option} {unix testwrapper} {
d624 1
a624 1
} {1 {wrong # args: should be "wm deiconify window"}}
d643 1
a643 1
} {1 {wrong # args: should be "wm focusmodel window ?active|passive?"}}
d659 1
a659 1
} {1 {wrong # args: should be "wm frame window"}}
d676 1
a676 1
} {1 {wrong # args: should be "wm geometry window ?newGeometry?"}}
d713 1
a713 1
} {1 {wrong # args: should be "wm grid window ?baseWidth baseHeight widthInc heightInc?"}}
d716 1
a716 1
} {1 {wrong # args: should be "wm grid window ?baseWidth baseHeight widthInc heightInc?"}}
d758 1
a758 1
} {1 {wrong # args: should be "wm group window ?pathName?"}}
d762 1
a762 1
test unixWm-21.3 {Tk_WmCmd procedure, "group" option} {unix testwrapper} {
d774 1
a774 1
test unixWm-21.4 {Tk_WmCmd procedure, "group" option, make window exist} {unix testwrapper} {
d784 1
a784 1
test unixWm-21.5 {Tk_WmCmd procedure, "group" option, create leader wrapper} {unix testwrapper} {
d798 1
a798 1
test unixWm-22.1 {Tk_WmCmd procedure, "iconbitmap" option} unix {
d800 2
a801 2
} {1 {wrong # args: should be "wm iconbitmap window ?bitmap?"}}
test unixWm-22.2 {Tk_WmCmd procedure, "iconbitmap" option} {unix testwrapper} {
d819 1
a819 1
} {1 {wrong # args: should be "wm iconify window"}}
d872 2
a873 2
} {1 {wrong # args: should be "wm iconmask window ?bitmap?"}}
test unixWm-24.2 {Tk_WmCmd procedure, "iconmask" option} {unix testwrapper} {
d891 1
a891 1
} {1 {ambiguous option "icon": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d894 2
a895 2
} {1 {wrong # args: should be "wm iconname window ?newName?"}}
test unixWm-25.3 {Tk_WmCmd procedure, "iconname" option} {unix testwrapper} {
d906 1
a906 1
} {1 {wrong # args: should be "wm iconposition window ?x y?"}}
d909 2
a910 2
} {1 {wrong # args: should be "wm iconposition window ?x y?"}}
test unixWm-26.3 {Tk_WmCmd procedure, "iconposition" option} {unix testwrapper} {
d931 2
a932 2
} {1 {wrong # args: should be "wm iconwindow window ?pathName?"}}
test unixWm-27.2 {Tk_WmCmd procedure, "iconwindow" option} {unix testwrapper} {
d997 10
a1006 1
test unixWm-28.1 {Tk_WmCmd procedure, "maxsize" option} {nonPortable} {
d1009 11
a1019 2

test unixWm-28.2 {Tk_WmCmd procedure, "maxsize" option} {nonPortable} {
d1035 23
a1057 1
test unixWm-29.1 {Tk_WmCmd procedure, "minsize" option} {nonPortable} {
d1075 1
a1075 1
} {1 {wrong # args: should be "wm overrideredirect window ?boolean?"}}
d1090 2
a1091 2
} {1 {wrong # args: should be "wm positionfrom window ?user/program?"}}
test unixWm-31.2 {Tk_WmCmd procedure, "positionfrom" option} {unix testwrapper} {
d1111 1
a1111 1
} {1 {wrong # args: should be "wm protocol window ?name? ?command?"}}
d1120 1
a1120 1
test unixWm-32.3 {Tk_WmCmd procedure, "protocol" option} {unix testwrapper} {
d1162 1
a1162 1
} {1 {wrong # args: should be "wm resizable window ?width height?"}}
d1165 1
a1165 1
} {1 {wrong # args: should be "wm resizable window ?width height?"}}
d1193 2
a1194 2
} {1 {wrong # args: should be "wm sizefrom window ?user|program?"}}
test unixWm-34.2 {Tk_WmCmd procedure, "sizefrom" option} {unix testwrapper} {
d1212 1
a1212 1
test unixWm-35.1 {Tk_WmCmd procedure, "state" option} unix {
d1214 1
a1214 1
} {1 {bad argument "1": must be normal, iconic, or withdrawn}}
d1217 1
a1217 1
} {1 {wrong # args: should be "wm state window ?state?"}}
d1255 2
a1256 2
} {1 {wrong # args: should be "wm title window ?newTitle?"}}
test unixWm-36.2 {Tk_WmCmd procedure, "title" option} {unix testwrapper} {
d1265 1
a1265 1
test unixWm-37.3 {Tk_WmCmd procedure, "transient" option} {unix testwrapper} {
d1282 1
a1282 12
test unixWm-37.4 {TkWmDeadWindow, destroy on master should clear transient} {unix testwrapper} {
    catch {destroy .t2}
    toplevel .t2
    catch {destroy .t3}
    toplevel .t3
    wm transient .t2 .t3
    update
    destroy .t3
    update
    list [wm transient .t2] [testprop [testwrapper .t2] WM_TRANSIENT_FOR]
} {{} 0x0}
test unixWm-37.5 {Tk_WmCmd procedure, "transient" option, create master wrapper} {unix testwrapper} {
d1298 1
a1298 1
} {1 {wrong # args: should be "wm withdraw window"}}
d1318 1
a1318 1
} {1 {bad option "unknown": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d1355 1
a1355 1
test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable testmenubar} {
d1539 1
a1539 1
test unixWm-44.9 {UpdateGeometryInfo procedure, updating fixed dimensions} {unix testwrapper} {
d1551 1
a1551 1
test unixWm-44.10 {UpdateGeometryInfo procedure, menubar changing} testmenubar {
d1566 1
a1566 1
test unixWm-45.1 {UpdateSizeHints procedure, grid information} {unix testwrapper} {
d1579 1
a1579 1
test unixWm-45.2 {UpdateSizeHints procedure} {unix testwrapper} {
d1591 1
a1591 1
test unixWm-45.3 {UpdateSizeHints procedure, grid with menu} {testmenubar testwrapper} {
d1607 1
a1607 1
test unixWm-45.4 {UpdateSizeHints procedure, not resizable with menu} {testmenubar testwrapper} {
d1734 1
a1734 1
test unixWm-49.2 {Tk_GetRootCoords procedure, menubars} {unix testmenubar} {
d1752 3
a1754 1
deleteWindows
d1757 1
a1757 1
    deleteWindows
d1777 1
a1777 1
    deleteWindows
d1798 2
a1799 4
test unixWm-50.3 {
	Tk_CoordsToWindow procedure, finding a toplevel with embedding
} -setup {
    deleteWindows
a1805 1
} -body {
d1820 2
a1821 3
} -cleanup {
    cleanupbg
} -result {{} .x .t .t.f}
d1836 2
a1837 2
test unixWm-50.5 {Tk_CoordsToWindow procedure, handling menubars} {unix testmenubar} {
    deleteWindows
d1859 1
a1859 1
    deleteWindows
d1935 1
a1935 1
deleteWindows
d1992 3
a1994 1
deleteWindows
d2153 1
a2153 1
test unixWm-54.1 {TkpMakeMenuWindow procedure, setting save_under} unix {
d2170 1
a2170 1
test unixWm-54.2 {TkpMakeMenuWindow procedure, setting override_redirect} unix {
d2185 1
a2185 1
test unixWm-55.1 {TkUnixSetMenubar procedure} {unix testmenubar} {
d2197 1
a2197 1
test unixWm-55.2 {TkUnixSetMenubar procedure, removing menubar} {unix testmenubar} {
d2216 1
a2216 1
test unixWm-55.3 {TkUnixSetMenubar procedure, removing geometry manager} {unix testmenubar} {
d2233 1
a2233 1
test unixWm-55.4 {TkUnixSetMenubar procedure, toplevel not yet created} {unix testmenubar} {
d2244 1
a2244 1
test unixWm-55.5 {TkUnixSetMenubar procedure, changing menubar} {unix testmenubar} {
d2263 1
a2263 1
test unixWm-55.6 {TkUnixSetMenubar procedure, changing menubar to self} {unix testmenubar} {
d2276 1
a2276 1
test unixWm-55.7 {TkUnixSetMenubar procedure, unsetting event handler} {unix testmenubar} {
d2296 1
a2296 1
test unixWm-56.1 {MenubarDestroyProc procedure} {unix testmenubar} {
d2311 1
a2311 1
test unixWm-57.1 {MenubarReqProc procedure} {unix testmenubar} {
d2326 1
a2326 1
test unixWm-57.2 {MenubarReqProc procedure} {unix testmenubar} {
d2342 1
a2342 1
test unixWm-58.1 {UpdateCommand procedure, DString gets reallocated} {unix testwrapper} {
d2375 4
a2378 2
test unixWm-59.1 {exit processing} {
    set script [makeFile {
d2381 3
a2383 2
    } script]
    if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} {
a2387 1
    removeFile script
d2390 4
a2393 2
test unixWm-59.2 {exit processing} {
    set script [makeFile {
d2400 3
a2402 2
    } script]
    if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} {
a2406 1
    removeFile script
d2409 4
a2412 2
test unixWm-59.3 {exit processing} {
    set script [makeFile {
d2425 3
a2427 2
    } script]
    if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} {
a2431 1
    removeFile script
a2434 10
test unixWm-60.1 {wm attributes} unix {
    destroy .t
    toplevel .t
    wm attributes .t
} {}
test unixWm-60.2 {wm attributes} unix {
    destroy .t
    toplevel .t
    list [catch {wm attributes .t -foo} msg] $msg
} {1 {wrong # args: should be "wm attributes window"}}
d2438 1
d2441 13
@


1.12
log
@* library/tkfbox.tcl: Moved an overlooked tkFDialog* function in
::tk::dialog::file namespace.

* tests/unixWm.test: Added tests for memory leak conditions in
tkUnixWm.c.

* tests/canvas.test: Added test for bad configuration options on
empty and non-empty canvas.

* generic/tkCanvas.c: Removed bad code in CANV_CONFIGURE block of
CanvasWidgetCmd; this was causing non-empty canvases to improperly
handle bad configuration options [Bug: 4456].
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.11 2000/01/12 11:45:36 hobbs Exp $
d1835 1
a1835 1
    load {} tk slave
@


1.12.4.1
log
@sync with head
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.14 2001/12/04 03:07:43 mdejong Exp $
d891 1
a891 1
} {1 {unknown or ambiguous option "icon": must be aspect, client, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d1324 1
a1324 1
} {1 {unknown or ambiguous option "unknown": must be aspect, client, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}}
d1835 1
a1835 1
    load {} Tk slave
@


1.12.6.1
log
@        * Merged in updates from HEAD branch.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.13 2001/03/28 17:27:10 dgp Exp $
d1835 1
a1835 1
    load {} Tk slave
@


1.12.2.1
log
@see ChangeLog for specific file details
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.13 2001/03/28 17:27:10 dgp Exp $
d1835 1
a1835 1
    load {} Tk slave
@


1.12.2.2
log
@* unix/tkUnixWm.c: (rev. 1.8.1.3) Backported changes for
  TIP 107 ("Fix the 2-second raise delay") to core-8-3-1-branch
  [Patch #601518]
* tests/unixWm.c (unixWm-51.7): added 200 ms delay after
  'raise' and 'lower' commands, since these are now asynchronous.
  (NB: there may be other regressions, this is the only one
  I encountered)
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.12.2.1 2001/04/04 07:57:17 hobbs Exp $
a2017 1
    after 200
a2020 1
    after 200
@


1.11
log
@	* tests/winWm.test:
	* tests/unixWm.test:
	* mac/tkMacWm.c:
	* unix/tkUnixWm.c: fixed possible X error being raised [Bug: 3377]
	* win/tkWinWm.c: wm deiconify in zoom state [Bug: 2077],
	fixed possible flashing of unmapped toplevel in deiconify [Bug: 3338]
	and fixed mapping of transient window [Bug: 572]
	Also, for all wm's, extended 'wm state' command to allow setting
	of the state, and added official support of 'zoomed' state on Win.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.10 1999/12/22 20:01:19 hobbs Exp $
d356 25
d2440 1
@


1.10
log
@	* tests/unixWm.test: nonPOrtable -> nonPortable
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.9 1999/12/16 02:13:49 wart Exp $
d1189 1
a1189 1
} {1 {wrong # arguments: must be "wm state window"}}
d1191 3
d1206 17
@


1.9
log
@Added a couple of extra update calls to prevent some window managers from
forcing users to manually place toplevels.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.8 1999/12/14 06:53:15 hobbs Exp $
d1599 1
a1599 1
test unixWm-47.1 {WaitRestrictProc procedure} {nonPOrtable} {
@


1.8
log
@	* tests/bind.test:
	* tests/canvImg.test:
	* tests/canvPsArc.tcl:
	* tests/canvPsImg.tcl: (new file)
	* tests/canvRect.test:
	* tests/canvText.test:
	* tests/canvas.test:
	* tests/defs.tcl:
	* tests/entry.test:
	* tests/event.test:
	* tests/font.test:
	* tests/frame.test:
	* tests/imgPhoto.test:
	* tests/safe.test:
	* tests/scale.test:
	* tests/scrollbar.test:
	* tests/select.test:
	* tests/text.test:
	* tests/textDisp.test:
	* tests/textTag.test:
	* tests/unixFont.test:
	* tests/unixWm.test:
	* tests/visual_bb.test:
	* tests/winClipboard.test: tests for the dash patch changes
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.7 1999/04/21 21:53:31 rjohnson Exp $
d825 1
d839 1
@


1.7
log
@
Merged 8-1-0 into mainline.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.6 1999/04/19 23:54:58 hershey Exp $
d1612 1
@


1.6
log
@changed tests--marked some nonPortable; added new constraints to fix bug 1770
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.5 1999/04/16 01:51:42 stanton Exp $
@


1.5
log
@* Merged 8.1 branch into the main trunk
@
text
@d10 1
a10 1
# RCS: @@(#) $Id$
d1597 1
a1597 1
test unixWm-47.1 {WaitRestrictProc procedure} {
@


1.5.2.1
log
@
Merged with mainline.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.6 1999/04/19 23:54:58 hershey Exp $
d1597 1
a1597 1
test unixWm-47.1 {WaitRestrictProc procedure} {nonPOrtable} {
@


1.4
log
@* tests/main.test:
* tests/unixWm.test: Better cleanup of temporary files.

Lint.
@
text
@d7 2
d10 5
a14 4
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @@(#) $Id: unixWm.test,v 1.3 1998/09/14 18:23:52 stanton Exp $
d17 2
a21 4
if {[string compare test [info procs test]] == 1} {
    source defs
}

d199 1
a199 1
test unixWm-6.4 {size changes} {nonPortable} {
d359 1
d1314 1
a1314 1
test unixWm-41.2 {ConfigureEvent procedure, menubars} {unixOnly} {
d1478 3
a1481 2
    catch {destroy .t}
    toplevel .t -width 80 -height 60
d1486 4
a1489 1
} "5 [expr [winfo screenheight .t] - 70]"
a1490 2
    catch {destroy .t}
    toplevel .t -width 80 -height 60
d1495 3
a1497 1
} "[expr [winfo screenwidth .t] - 110] 2"
d2300 31
d2341 1
a2341 1
    if {[catch {exec $tktest script -geometry 10x10+0+0} msg]} {
d2360 1
a2360 1
    if {[catch {exec $tktest script -geometry 10x10+0+0} msg]} {
d2385 1
a2385 1
    if {[catch {exec $tktest script -geometry 10x10+0+0} msg]} {
d2393 1
a2393 1
    
d2396 15
a2410 1
concat {}
@


1.3
log
@Replaced SCCS strings, fixed binary files
@
text
@d11 1
a11 1
# RCS: @@(#) $Id$
d2358 1
@


1.2
log
@skips tests that require tktest executable
@
text
@d11 1
a11 1
# SCCS: @@(#) unixWm.test 1.46 97/10/27 16:15:36
@


1.1
log
@Initial revision
@
text
@d355 6
@


1.1.4.1
log
@initial tk8.1a2 version
@
text
@d11 1
a11 1
# SCCS: @@(#) unixWm.test 1.47 98/01/20 14:20:10
a2286 31

test unixWm-58.1 {UpdateCommand procedure, DString gets reallocated} {unixOnly} {
    catch {destroy .t}
    toplevel .t -width 100 -height 50
    wm geom .t +0+0
    wm command .t "argumentNumber0 argumentNumber1 argumentNumber2 argumentNumber0 argumentNumber3 argumentNumber4 argumentNumber5 argumentNumber6 argumentNumber0 argumentNumber7 argumentNumber8 argumentNumber9 argumentNumber10 argumentNumber0 argumentNumber11 argumentNumber12 argumentNumber13 argumentNumber14 argumentNumber15 argumentNumber16 argumentNumber17 argumentNumber18"
    update
    testprop [testwrapper .t] WM_COMMAND
} {argumentNumber0
argumentNumber1
argumentNumber2
argumentNumber0
argumentNumber3
argumentNumber4
argumentNumber5
argumentNumber6
argumentNumber0
argumentNumber7
argumentNumber8
argumentNumber9
argumentNumber10
argumentNumber0
argumentNumber11
argumentNumber12
argumentNumber13
argumentNumber14
argumentNumber15
argumentNumber16
argumentNumber17
argumentNumber18
}
@


1.1.4.2
log
@Merged 8.0.3 changes into 8.1
@
text
@d11 1
a11 1
# RCS: @@(#) $Id: unixWm.test,v 1.3 1998/09/14 18:23:52 stanton Exp $
a353 6

if {[string compare testwrapper [info commands testwrapper]] != 0} {
    puts "This application hasn't been compiled with the testwrapper command,"
    puts "therefore I am skipping all of these tests."
    return
}
@


1.1.4.3
log
@* Various cleanup related to the Tcl_Eval and Tcl_ObjSetVar
changes in Tcl.

* Integrated patches from 8.0.5b2
@
text
@d11 1
a11 1
# RCS: @@(#) $Id: unixWm.test,v 1.1.4.2 1998/09/30 02:19:03 stanton Exp $
a2388 1
catch {removeFile script}
@


1.1.4.4
log
@Updated the testsuite to use "test" namespace and commandline args
to control verbose  level and which tests get run.  Tests now work from
any working dir.
@
text
@a6 2
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
d8 4
a11 1
# RCS: @@(#) $Id: unixWm.test,v 1.1.4.3 1999/02/11 04:13:49 stanton Exp $
a13 1
    puts "skipping: Unix only tests..."
d17 2
a18 2
if {[lsearch [namespace children] ::test] == -1} {
    source [file join [pwd] [file dirname [info script]] defs.tcl]
d2387 1
a2387 1
# cleanup
d2390 1
a2390 2
::test::cleanupTests
return
@


1.1.4.5
log
@fixed tests' depency on working dir = tests
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.1.4.4 1999/03/11 18:51:18 hershey Exp $
d2335 1
a2335 1
    if {[catch {exec $::test::tktest script -geometry 10x10+0+0} msg]} {
d2354 1
a2354 1
    if {[catch {exec $::test::tktest script -geometry 10x10+0+0} msg]} {
d2379 1
a2379 1
    if {[catch {exec $::test::tktest script -geometry 10x10+0+0} msg]} {
@


1.1.4.6
log
@- changed ::test to ::tcltest
- made many tests more atomic (still more work to do here)
- defs.tcl is now identicle for tcl and tk
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.1.4.5 1999/03/11 23:51:27 hershey Exp $
d17 1
a17 1
if {[lsearch [namespace children] ::tcltest] == -1} {
d2335 1
a2335 1
    if {[catch {exec $::tcltest::tktest script -geometry 10x10+0+0} msg]} {
d2354 1
a2354 1
    if {[catch {exec $::tcltest::tktest script -geometry 10x10+0+0} msg]} {
d2379 1
a2379 1
    if {[catch {exec $::tcltest::tktest script -geometry 10x10+0+0} msg]} {
d2390 1
a2390 1
::tcltest::cleanupTests
a2391 12












@


1.1.4.7
log
@lint:  changed a tcltest namespace variable name from tmpDir to
       workingDir.
changes:  made more tests atomic.
README is now updated to match new test suite features.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.1.4.6 1999/03/24 01:17:15 hershey Exp $
a2391 1

@


1.1.4.8
log
@Now all test files that skip tests by returning early (which ideally they
shouldn't do) call ::tcltest::cleanupTests before returning.  The defs.tcl
file has one hew constraint:  userInteraction, used by tests that require
user interaction.  The next putback will include an updated version of the
"visual" test file to use this mechanism.
@
text
@d10 1
a10 5
# RCS: @@(#) $Id: unixWm.test,v 1.1.4.7 1999/03/24 02:55:09 hershey Exp $

if {[lsearch [namespace children] ::tcltest] == -1} {
    source [file join [pwd] [file dirname [info script]] defs.tcl]
}
a13 1
    ::tcltest::cleanupTests
d17 4
d198 1
a198 1
test unixWm-6.4 {size changes} {nonPortable userInteraction} {
a357 1
    ::tcltest::cleanupTests
@


1.1.4.9
log
@fixed tests for bug ids: 1521 1578 1570 1580 and 1608
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.1.4.8 1999/03/26 00:08:10 hershey Exp $
a1477 3

catch {destroy .t}
toplevel .t -width 80 -height 60
d1479 2
d1485 1
a1485 4
} [list 5 [expr [winfo screenheight .t] - 70]]

catch {destroy .t}
toplevel .t -width 80 -height 60
d1487 2
d1493 1
a1493 3
} [list [expr [winfo screenwidth .t] - 110] 2]
catch {destroy .t}

@


1.1.4.10
log
@
Marked test non-portable.
@
text
@d10 1
a10 1
# RCS: @@(#) $Id: unixWm.test,v 1.1.4.9 1999/04/02 18:06:45 hershey Exp $
d1314 1
a1314 1
test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable} {
@


