Tk Source Code

Check-in [60230550]
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:(Modernized) patch from egavilan to fix [2863003fff] and [d6b95ce492] - tk frame does not shrink to 0 height if last children unpacked. A virtual event is sent when the pack or grid geometry manager leaves a parent without any slaves
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-d6b95ce492 | rfe-2863003fff
Files: files | file ages | folders
SHA1: 60230550e897546ad2000b515598a9723d816e89
User & Date: fvogel 2016-09-21 06:32:55
References
2016-11-07
07:55 Ticket [2863003f] Add a virtual event when GM leaves parent without slaves status still Open with 4 other changes artifact: 7a730ff9 user: oehhar
2016-09-21
07:13 Ticket [2863003f]: 7 changes artifact: 7ba1fc07 user: oehhar
Context
2018-09-22
19:10
Update to implement TIP518 event name change check-in: 23815eb1 user: oehhar tags: tip518-event-last-child-unmanaged
2016-09-21
06:32
(Modernized) patch from egavilan to fix [2863003fff] and [d6b95ce492] - tk frame does not shrink to 0 height if last children unpacked. A virtual event is sent when the pack or grid geometry manager leaves a parent without any slaves Leaf check-in: 60230550 user: fvogel tags: bug-d6b95ce492, rfe-2863003fff
2016-09-10
09:07
Fixed [eb26817783] - listbox-13.3 fails on Linux check-in: faa07d44 user: fvogel tags: core-8-6-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tkGrid.c.

1729
1730
1731
1732
1733
1734
1735
1736


1737
1738
1739
1740
1741

1742
1743
1744
1745
1746
1747
1748
    int realWidth, realHeight;	/* Actual size layout should take-up. */
    int usedX, usedY;

    masterPtr->flags &= ~REQUESTED_RELAYOUT;

    /*
     * If the master has no slaves anymore, then don't do anything at all:
     * just leave the master's size as-is. Otherwise there is no way to


     * "relinquish" control over the master so another geometry manager can
     * take over.
     */

    if (masterPtr->slavePtr == NULL) {

	return;
    }

    if (masterPtr->masterDataPtr == NULL) {
	return;
    }







|
>
>
|
<



>







1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739

1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
    int realWidth, realHeight;	/* Actual size layout should take-up. */
    int usedX, usedY;

    masterPtr->flags &= ~REQUESTED_RELAYOUT;

    /*
     * If the master has no slaves anymore, then don't do anything at all:
     * just leave the master's size as-is, but signal the master with the
     * <<GeometryManager>> virtual event.
     * Otherwise there is no way to "relinquish" control over the master
     * so another geometry manager can take over.

     */

    if (masterPtr->slavePtr == NULL) {
        TkSendVirtualEvent(masterPtr->tkwin, "GeometryManager", NULL);
	return;
    }

    if (masterPtr->masterDataPtr == NULL) {
	return;
    }

Changes to generic/tkPack.c.

596
597
598
599
600
601
602
603



604
605
606

607
608
609
610
611
612
613
    int borderLeft, borderRight;
    int maxWidth, maxHeight, tmp;

    masterPtr->flags &= ~REQUESTED_REPACK;

    /*
     * If the master has no slaves anymore, then don't do anything at all:
     * just leave the master's size as-is.



     */

    if (masterPtr->slavePtr == NULL) {

	return;
    }

    /*
     * Abort any nested call to ArrangePacking for this window, since we'll do
     * everything necessary here, and set up so this call can be aborted if
     * necessary.






|
>
>
>



>







596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
    int borderLeft, borderRight;
    int maxWidth, maxHeight, tmp;

    masterPtr->flags &= ~REQUESTED_REPACK;

    /*
     * If the master has no slaves anymore, then don't do anything at all:
     * just leave the master's size as-is, but signal the master with the
     * <<GeometryManager>> virtual event.
     * Otherwise there is no way to "relinquish" control over the master
     * so another geometry manager can take over.
     */

    if (masterPtr->slavePtr == NULL) {
        TkSendVirtualEvent(masterPtr->tkwin, "GeometryManager", NULL);
	return;
    }

    /*
     * Abort any nested call to ArrangePacking for this window, since we'll do
     * everything necessary here, and set up so this call can be aborted if
     * necessary.