diff options
author | fvogel <fvogel@noemail.net> | 2016-09-21 06:32:55 (GMT) |
---|---|---|
committer | fvogel <fvogel@noemail.net> | 2016-09-21 06:32:55 (GMT) |
commit | a0bd5e615df96644cc98de4226c85c9f2eb78437 (patch) | |
tree | d27524df7dc9f489e4f90bb5e65fad861f505005 | |
parent | 974410e6f247b80da3fd79a1de764aa994651a89 (diff) | |
download | tk-a0bd5e615df96644cc98de4226c85c9f2eb78437.zip tk-a0bd5e615df96644cc98de4226c85c9f2eb78437.tar.gz tk-a0bd5e615df96644cc98de4226c85c9f2eb78437.tar.bz2 |
(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 slavesbug-d6b95ce492
FossilOrigin-Name: 60230550e897546ad2000b515598a9723d816e89
-rw-r--r-- | generic/tkGrid.c | 8 | ||||
-rw-r--r-- | generic/tkPack.c | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/generic/tkGrid.c b/generic/tkGrid.c index 2a88b76..a4b4125 100644 --- a/generic/tkGrid.c +++ b/generic/tkGrid.c @@ -1733,12 +1733,14 @@ ArrangeGrid( /* * 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. + * 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; } diff --git a/generic/tkPack.c b/generic/tkPack.c index 88a4b2d..d46d64c 100644 --- a/generic/tkPack.c +++ b/generic/tkPack.c @@ -600,10 +600,14 @@ ArrangePacking( /* * If the master has no slaves anymore, then don't do anything at all: - * just leave the master's size as-is. + * 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; } |