Tk Source Code

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

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

Overview
Comment:Fixed bug [d95e5d8f16] - Hidden panes in panedwindow incorrectly trigger <Map> events (cherrypicked [42c8d8441c])
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-6-branch
Files: files | file ages | folders
SHA1:a97a2f58e029079672f6c0f8e8f9524938bae294
User & Date: fvogel 2016-03-11 08:24:23
Context
2016-03-20
08:15
Merged tip-443 following acceptation of the TIP by TCT vote check-in: cb3354b2 user: fvogel tags: core-8-6-branch
08:13
Rebased to core-8-6-branch Closed-Leaf check-in: 0bcde16a user: fvogel tags: tip-443
2016-03-11
08:24
Fixed bug [d95e5d8f16] - Hidden panes in panedwindow incorrectly trigger <Map> events (cherrypicked [42c8d8441c]) check-in: a97a2f58 user: fvogel tags: core-8-6-branch
08:23
Fixed bug [d95e5d8f16] - Hidden panes in panedwindow incorrectly trigger <Map> events check-in: 42c8d844 user: fvogel tags: trunk
2016-03-09
14:29
(cherry-pick) Explicit require Tcl 8.6.0, no matter if Tk is compiled against a later Tcl patchlevel. check-in: 7f3247c1 user: jan.nijtmans tags: core-8-6-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tkPanedWindow.c.

1366
1367
1368
1369
1370
1371
1372

1373

1374
1375
1376

1377

1378
1379
1380
1381
1382
1383
1384
	    Tcl_DoWhenIdle(DisplayPanedWindow, pwPtr);
	    pwPtr->flags |= REDRAW_PENDING;
	}
    } else if (eventPtr->type == DestroyNotify) {
	DestroyPanedWindow(pwPtr);
    } else if (eventPtr->type == UnmapNotify) {
        for (i = 0; i < pwPtr->numSlaves; i++) {

            Tk_UnmapWindow(pwPtr->slaves[i]->tkwin);

        }
    } else if (eventPtr->type == MapNotify) {
        for (i = 0; i < pwPtr->numSlaves; i++) {

            Tk_MapWindow(pwPtr->slaves[i]->tkwin);

        }
    }
}
 
/*
 *----------------------------------------------------------------------
 *







>
|
>



>
|
>







1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
	    Tcl_DoWhenIdle(DisplayPanedWindow, pwPtr);
	    pwPtr->flags |= REDRAW_PENDING;
	}
    } else if (eventPtr->type == DestroyNotify) {
	DestroyPanedWindow(pwPtr);
    } else if (eventPtr->type == UnmapNotify) {
        for (i = 0; i < pwPtr->numSlaves; i++) {
            if (!pwPtr->slaves[i]->hide) {
                Tk_UnmapWindow(pwPtr->slaves[i]->tkwin);
            }
        }
    } else if (eventPtr->type == MapNotify) {
        for (i = 0; i < pwPtr->numSlaves; i++) {
            if (!pwPtr->slaves[i]->hide) {
                Tk_MapWindow(pwPtr->slaves[i]->tkwin);
            }
        }
    }
}
 
/*
 *----------------------------------------------------------------------
 *

Changes to tests/panedwindow.test.

4951
4952
4953
4954
4955
4956
4957
































4958
4959
4960
4961
4962
4963
4964
	lappend result [winfo ismapped .f1] [winfo ismapped .f2] \
		[winfo ismapped .f3] [winfo ismapped .f4]
	lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
		[winfo width .f4] [winfo width .p]
} -cleanup {
    deleteWindows
} -result {1 1 1 0 39 40 40 1 130 1 0 1 1 40 40 40 42 130}
































test panedwindow-23.31 {ConfigurePanes, -hide works, last pane stretches} -setup {
	deleteWindows
} -body {
	panedwindow .p -showhandle false -width 200 -height 200 -borderwidth 0
	frame .f1 -width 50 -bg red
	frame .f2 -width 50 -bg green
	frame .f3 -width 50 -bg blue







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
	lappend result [winfo ismapped .f1] [winfo ismapped .f2] \
		[winfo ismapped .f3] [winfo ismapped .f4]
	lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
		[winfo width .f4] [winfo width .p]
} -cleanup {
    deleteWindows
} -result {1 1 1 0 39 40 40 1 130 1 0 1 1 40 40 40 42 130}
test panedwindow-23.30a {ConfigurePanes, hidden panes are unmapped} -setup {
	deleteWindows
} -body {
    panedwindow .p1 -sashrelief raised
    panedwindow .p2 -sashrelief raised
    label .l1 -text Label1
    label .l2 -text Label2
    label .l3 -text Label3
    .p2 add .l2 -sticky nsew
    .p2 add .l3 -sticky nsew
    .p1 add .p2 -sticky nsew
    .p1 add .l1 -sticky nsew
    pack .p1 -side top -expand 1 -fill both
	update
	set result [list]
	lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
		    [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
    .p2 paneconfigure .l1 -hide 1
	update
	lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
		    [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
    .p1 paneconfigure .p2 -hide 1
	update
	lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
		    [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
    .p1 paneconfigure .p2 -hide 0
	update
	lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
		    [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
} -cleanup {
    deleteWindows
} -result {{1 1 1 1 1} {1 1 0 1 1} {1 0 0 0 0} {1 1 0 1 1}}
test panedwindow-23.31 {ConfigurePanes, -hide works, last pane stretches} -setup {
	deleteWindows
} -body {
	panedwindow .p -showhandle false -width 200 -height 200 -borderwidth 0
	frame .f1 -width 50 -bg red
	frame .f2 -width 50 -bg green
	frame .f3 -width 50 -bg blue