Tk Source Code

Check-in [c3106c50]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:On Aqua, tests should wait for the animation to finish before checking the geometry of a newly iconified window.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-185c8557d9
Files: files | file ages | folders
SHA3-256:c3106c50c898f8274e8a62312a1f5c48afa1ff2c7dfc4f8921c44971b729e45b
User & Date: culler 2018-12-08 16:25:48
References
2018-12-09
16:38 Ticket [185c8557] mac os x: wm overrideredict causes window to disappear... status still Open with 3 other changes artifact: 515419b5 user: fvogel
Context
2018-12-09
16:42
Aqua: Fix some subtle bugs in wm geometry. Fix the iconwindow implementation. Adjust some unixWm tests. check-in: 328d9342 user: culler tags: bug-185c8557d9
2018-12-08
16:25
On Aqua, tests should wait for the animation to finish before checking the geometry of a newly iconified window. check-in: c3106c50 user: culler tags: bug-185c8557d9
03:08
Remove overrideredirect, transient, and help-styled windows from fullscreen API check-in: e6260777 user: kevin_walzer tags: bug-185c8557d9
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to macosx/tkMacOSXWm.c.

6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503


6504
6505
6506
6507
6508
6509
6510
6511
	     * full screen, was included in the default as of OSX 10.13.  For
	     * uniformity we use the new default in all versions of the OS
	     * where the behavior exists.
	     */

#if !(MAC_OS_X_VERSION_MAX_ALLOWED < 1070)
	    if (!(macWindow.styleMask & NSUtilityWindowMask)) {
		
		/*
		 * Exclude overrideredirect, transient, and "help"-styled
		 * windows from moving into their own fullscreen space. 
		 *
		 */
		    


		if ((winPtr->atts.override_redirect) || (wmPtr->master != None) || (winPtr->wmInfoPtr->macClass == kHelpWindowClass)) {
		    b |= (NSWindowCollectionBehaviorCanJoinAllSpaces |
			  NSWindowCollectionBehaviorFullScreenAuxiliary);
		} else {
		    NSSize screenSize = [[macWindow screen]frame].size;
		    b |= NSWindowCollectionBehaviorFullScreenPrimary;

		    /* The default max size has height less than the screen height.







|


|


|
>
>
|







6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
	     * full screen, was included in the default as of OSX 10.13.  For
	     * uniformity we use the new default in all versions of the OS
	     * where the behavior exists.
	     */

#if !(MAC_OS_X_VERSION_MAX_ALLOWED < 1070)
	    if (!(macWindow.styleMask & NSUtilityWindowMask)) {

		/*
		 * Exclude overrideredirect, transient, and "help"-styled
		 * windows from moving into their own fullscreen space.
		 *
		 */

		if ((winPtr->atts.override_redirect) ||
		    (wmPtr->master != None) ||
		    (winPtr->wmInfoPtr->macClass == kHelpWindowClass)) {
		    b |= (NSWindowCollectionBehaviorCanJoinAllSpaces |
			  NSWindowCollectionBehaviorFullScreenAuxiliary);
		} else {
		    NSSize screenSize = [[macWindow screen]frame].size;
		    b |= NSWindowCollectionBehaviorFullScreenPrimary;

		    /* The default max size has height less than the screen height.

Changes to tests/unixWm.test.

14
15
16
17
18
19
20








21
22
23
24
25
26
27
..
72
73
74
75
76
77
78

79
80
81
82
83
84
85
..
87
88
89
90
91
92
93

94
95
96
97
98
99
100
...
397
398
399
400
401
402
403

404
405
406
407
408
409
410
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
................................................................................
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
}

................................................................................
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
................................................................................
    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







>
>
>
>
>
>
>
>







 







>







 







>







 







>







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
..
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
...
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
namespace import -force ::tk::test:loadTkCommand

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

# Recent versions of macOS show an animation when a window is deiconified.
# Tests which check the geometry of a window after deiconifying it should
# wait for the animation to finish.

proc deiconifyDelay {} {
    sleep 250
}

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

proc makeToplevels {} {
    deleteWindows
    foreach i {.raise1 .raise2 .raise3} {
	toplevel $i
................................................................................
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
	deiconifyDelay
	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
}

................................................................................
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
	deiconifyDelay
	wm geom .t
    } 100x150$geom
    incr i
}

test unixWm-5.1 {compounded state changes} {unix nonPortable} {
    destroy .t
................................................................................
    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
    sleep 200
    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