diff options
author | culler <culler> | 2020-07-23 16:56:13 (GMT) |
---|---|---|
committer | culler <culler> | 2020-07-23 16:56:13 (GMT) |
commit | c4ee254b9c95c505554f58ca85c20f1ede0a1e52 (patch) | |
tree | 101b471f31cd63e671502a53e3ad81da429d526a | |
parent | 364c3cdadc46755bf53a69063125d5efbe391f0e (diff) | |
download | tk-c4ee254b9c95c505554f58ca85c20f1ede0a1e52.zip tk-c4ee254b9c95c505554f58ca85c20f1ede0a1e52.tar.gz tk-c4ee254b9c95c505554f58ca85c20f1ede0a1e52.tar.bz2 |
All tests pass on Yosemite now.
-rw-r--r-- | macosx/tkMacOSXWm.c | 5 | ||||
-rw-r--r-- | tests/unixWm.test | 14 | ||||
-rw-r--r-- | tests/wm.test | 20 |
3 files changed, 24 insertions, 15 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 3af2ff5..90e4a70 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -6425,6 +6425,11 @@ TkpWmSetState( [macWin orderFront:NSApp]; TkMacOSXZoomToplevel(macWin, state == NormalState ? inZoomIn : inZoomOut); } + /* + * Make sure windows are updated after the state change. + */ + + while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)){} } /* diff --git a/tests/unixWm.test b/tests/unixWm.test index bd68511..39a68ae 100644 --- a/tests/unixWm.test +++ b/tests/unixWm.test @@ -292,6 +292,7 @@ test unixWm-8.4 {icon windows} unix { destroy .icon toplevel .t -width 100 -height 30 wm geom .t +0+0 + update idletasks set result [wm iconwindow .t] toplevel .icon -width 50 -height 50 -bg red wm iconwindow .t .icon @@ -301,7 +302,7 @@ test unixWm-8.4 {icon windows} unix { update lappend result [winfo ismapped .t] [winfo ismapped .icon] wm iconify .t - update + update idletasks lappend result [winfo ismapped .t] [winfo ismapped .icon] } {.icon icon {} withdrawn 1 0 0 0} test unixWm-8.5 {icon windows} unix { @@ -854,9 +855,9 @@ test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} unix { destroy .t2 toplevel .t2 wm geom .t2 +0+0 - update + update idletasks wm iconify .t2 - update + update idletasks set result [winfo ismapped .t2] destroy .t2 set result @@ -865,10 +866,10 @@ test unixWm-23.6 {Tk_WmCmd procedure, "iconify" option} unix { destroy .t2 toplevel .t2 wm geom .t2 -0+0 - update + update idletasks set result [winfo ismapped .t2] wm iconify .t2 - update + update idletasks lappend result [winfo ismapped .t2] destroy .t2 set result @@ -1977,9 +1978,10 @@ test unixWm-50.10 {Tk_CoordsToWindow procedure, unmapped windows} unix { frame .t.f -width 150 -height 150 -bd 2 -relief raised place .t.f -x 25 -y 25 tkwait visibility .t.f + update idletasks set result [list [winfo containing 100 100]] place forget .t.f - update + update idletasks lappend result [winfo containing 100 100] } {.t.f .t} deleteWindows diff --git a/tests/wm.test b/tests/wm.test index 9e6d8ce..fac02fe 100644 --- a/tests/wm.test +++ b/tests/wm.test @@ -33,7 +33,9 @@ proc stdWindow {} { # proc raiseDelay {} { - after 100; update + after 100; + update + update idletasks } # How to carry out a small delay while processing events @@ -808,10 +810,10 @@ test wm-iconify-2.4.2 {Misc errors} -constraints !win -setup { test wm-iconify-3.1 {iconify behavior} -body { toplevel .t2 wm geom .t2 -0+0 - update + update idletasks set result [winfo ismapped .t2] wm iconify .t2 - update + update idletasks lappend result [winfo ismapped .t2] } -cleanup { destroy .t2 @@ -1738,11 +1740,11 @@ test wm-transient-4.2 {already mapped transient toplevel toplevel .master raiseDelay wm iconify .master - update + update idletasks toplevel .subject - update + update idletasks wm transient .subject .master - update + update idletasks list [wm state .subject] [winfo ismapped .subject] } -cleanup { deleteWindows @@ -1753,13 +1755,13 @@ test wm-transient-4.3 {iconify/deiconify on the master } -body { toplevel .master toplevel .subject - update + update idletasks wm transient .subject .master wm iconify .master - update + update idletasks lappend results [wm state .subject] [winfo ismapped .subject] wm deiconify .master - update + update idletasks lappend results [wm state .subject] [winfo ismapped .subject] } -cleanup { deleteWindows |