Tk Source Code

Check-in [02ca3773]
Login

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

Overview
Comment:Partial fix of bug [67384bce7d]: change expected result of winfo-13.2. Also disable test of unimplemented TkpRedirectKeyEvent
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | core-8-6-branch
Files: files | file ages | folders
SHA3-256: 02ca3773054bc56327eaaf0c527ac144626c8ea16d98dc1215d5c1beb1027323
User & Date: culler 2019-05-25 17:29:17.199
References
2019-05-26
21:07
Fix error in the spelling of the Windows windowingsystem introduced in [02ca3773] check-in: 7a378858 user: fvogel tags: core-8-6-branch
19:04 Ticket [67384bce] Side effects of destroying an embedded window depend on the OS status still Open with 3 other changes artifact: 9effaace user: fvogel
16:21 Ticket [58665b91] Many of the unixEmbed tests fail on macOS status still Open with 3 other changes artifact: 5206073a user: fvogel
Context
2019-05-26
18:38
Merge implementation of TIP #541 following positive vote by the TCT. check-in: ab1ef117 user: fvogel tags: core-8-6-branch
2019-05-25
17:34
Partial fix of bug [67384bce7d]: change expected result of winfo-13.2. Also disable test of unimplemented TkpRedirectKeyEvent check-in: 784eeed3 user: culler tags: trunk
17:29
Partial fix of bug [67384bce7d]: change expected result of winfo-13.2. Also disable test of unimplemented TkpRedirectKeyEvent Closed-Leaf check-in: 5f2e27c5 user: culler tags: mistake
17:29
Partial fix of bug [67384bce7d]: change expected result of winfo-13.2. Also disable test of unimplemented TkpRedirectKeyEvent check-in: 02ca3773 user: culler tags: core-8-6-branch
2019-05-24
21:55
Tweak test image-7.1. check-in: 0ed60e17 user: culler tags: core-8-6-branch
12:55
Fix bug [67384bce7d]: make winfo-13.2 expect the container to be destroyed in aqua and unix. Also disable unixEmbed-7.1a in aqua since TkpRedirectKeyEvent is not implemented. Closed-Leaf check-in: eb06c63e user: culler tags: bug-67384bce7d
Changes
Unified Diff Ignore Whitespace Patch
Changes to macosx/tkMacOSXEmbed.c.
844
845
846
847
848
849
850


851
852
853
854
855
856
857
858
	 * the screen.
	 */

	XMapWindow(eventPtr->xmaprequest.display,
		eventPtr->xmaprequest.window);
    } else if (eventPtr->type == DestroyNotify) {
	/*


	 * The embedded application is gone. Destroy the container window.
	 */

	Tk_DestroyWindow((Tk_Window) winPtr);
    }
    Tk_DeleteErrorHandler(errHandler);
}








>
>
|







844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
	 * the screen.
	 */

	XMapWindow(eventPtr->xmaprequest.display,
		eventPtr->xmaprequest.window);
    } else if (eventPtr->type == DestroyNotify) {
	/*
	 * It is not clear whether the container should be destroyed
	 * when an embedded window is destroyed.  See ticket [67384bce7d].
	 * Here we are following unix, by destroying the container.
	 */

	Tk_DestroyWindow((Tk_Window) winPtr);
    }
    Tk_DeleteErrorHandler(errHandler);
}

Changes to tests/unixEmbed.test.
979
980
981
982
983
984
985


986
987
988
989
990
991
992
993
994
    }]
    update
    list $x $y
} -cleanup {
	deleteWindows
    bind . <KeyPress> {}
} -result {{{key a 1}} {}}


test unixEmbed-7.1a {TkpRedirectKeyEvent procedure, forward keystroke} -constraints {
    unix
} -setup {
    deleteWindows
    catch {interp delete slave}
    ::_test_tmp::testInterp slave
    load {} Tktest slave
} -body {
    deleteWindows







>
>

|







979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
    }]
    update
    list $x $y
} -cleanup {
	deleteWindows
    bind . <KeyPress> {}
} -result {{{key a 1}} {}}
# TkpRedirectKeyEvent is not implemented in win or aqua.  If someone
# implements it they should change the constraints for this test.
test unixEmbed-7.1a {TkpRedirectKeyEvent procedure, forward keystroke} -constraints {
    unix notAqua
} -setup {
    deleteWindows
    catch {interp delete slave}
    ::_test_tmp::testInterp slave
    load {} Tktest slave
} -body {
    deleteWindows
Changes to tests/winfo.test.
390
391
392
393
394
395
396







397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419

    list rootx [expr {[winfo rootx .emb] == [winfo rootx .con]}] \
        rooty [expr {[winfo rooty .emb] == [winfo rooty .con]}]
} -cleanup {
    deleteWindows
} -result {rootx 1 rooty 1}








test winfo-13.2 {destroying embedded toplevel} -setup {
    deleteWindows
} -body {
    frame .con -container 1
    pack .con -expand yes -fill both
    toplevel .emb -use [winfo id .con] -bd 0 -highlightthickness 0
    button .emb.b
    pack .emb.b -expand yes -fill both
    update

    destroy .emb
    update
    list embedded [winfo exists .emb.b] container [winfo exists .con]
} -cleanup {
    deleteWindows
} -result {embedded 0 container 1}

test winfo-13.3 {destroying container window} -setup {
    deleteWindows
} -body {
    frame .con -container 1
    pack .con -expand yes -fill both
    toplevel .emb -use [winfo id .con] -bd 0 -highlightthickness 0







>
>
>
>
>
>
>















|







390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426

    list rootx [expr {[winfo rootx .emb] == [winfo rootx .con]}] \
        rooty [expr {[winfo rooty .emb] == [winfo rooty .con]}]
} -cleanup {
    deleteWindows
} -result {rootx 1 rooty 1}

# Windows does not destroy the container when an embedded window is
# destroyed.  Unix and macOS do destroy it.  See ticket [67384bce7d].
if {[tk windowingsystem] == "win"} {
   set result_13_2 {embedded 0 container 1}
} else {
   set result_13_2 {embedded 0 container 0}
}
test winfo-13.2 {destroying embedded toplevel} -setup {
    deleteWindows
} -body {
    frame .con -container 1
    pack .con -expand yes -fill both
    toplevel .emb -use [winfo id .con] -bd 0 -highlightthickness 0
    button .emb.b
    pack .emb.b -expand yes -fill both
    update

    destroy .emb
    update
    list embedded [winfo exists .emb.b] container [winfo exists .con]
} -cleanup {
    deleteWindows
} -result $result_13_2

test winfo-13.3 {destroying container window} -setup {
    deleteWindows
} -body {
    frame .con -container 1
    pack .con -expand yes -fill both
    toplevel .emb -use [winfo id .con] -bd 0 -highlightthickness 0