Tk Source Code

Check-in [5f2e27c5]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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 | SQL archive
Timelines: family | ancestors | mistake
Files: files | file ages | folders
SHA3-256: 5f2e27c5e0070a00263e26b8ef875ddc1e8217c736313fcd1af3e546165c19b0
User & Date: culler 2019-05-25 17:29:54
Context
2019-05-25
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
22:06
Improve image testing for Aqua check-in: e49ebc82 user: culler tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to macosx/tkMacOSXEmbed.c.

845
846
847
848
849
850
851
852


853
854
855
856
857
858
859
	 * 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);
}
 






|
>
>







845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
	 * 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
...
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
................................................................................
    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
...
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
................................................................................
    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