diff options
author | fvogel <fvogelnew1@free.fr> | 2018-10-29 23:01:08 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2018-10-29 23:01:08 (GMT) |
commit | 5dbd806ccb9de26b2c953153fc9057fbc7fe729b (patch) | |
tree | 961dc8d4929836006c5b49dc593b154d2fb84277 /generic/tkGrid.c | |
parent | e2dd87abf18c856f4cda284db55b313e882e919f (diff) | |
download | tk-5dbd806ccb9de26b2c953153fc9057fbc7fe729b.zip tk-5dbd806ccb9de26b2c953153fc9057fbc7fe729b.tar.gz tk-5dbd806ccb9de26b2c953153fc9057fbc7fe729b.tar.bz2 |
Enhance the tests for <<NoManagedChild>>, and fix the implementation so that this event only fires when the last slave is forgotten/removed.
Diffstat (limited to 'generic/tkGrid.c')
-rw-r--r-- | generic/tkGrid.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/generic/tkGrid.c b/generic/tkGrid.c index 4711685..ec22016 100644 --- a/generic/tkGrid.c +++ b/generic/tkGrid.c @@ -1735,13 +1735,9 @@ ArrangeGrid( * If the master has no slaves anymore, then don't change the master size. * Otherwise there is no way to "relinquish" control over the master * so another geometry manager can take over. - * - * Sends the event "NoManagedChild" to the master to inform it about there - * being no managed children inside it. */ if (masterPtr->slavePtr == NULL) { - TkSendVirtualEvent(masterPtr->tkwin, "NoManagedChild", NULL); return; } @@ -2780,11 +2776,15 @@ Unlink( /* * If we have emptied this master from slaves it means we are no longer * handling it and should mark it as free. + * + * Send the event "NoManagedChild" to the master to inform it about there + * being no managed children inside it. */ if ((masterPtr->slavePtr == NULL) && (masterPtr->flags & ALLOCED_MASTER)) { TkFreeGeometryMaster(masterPtr->tkwin, "grid"); masterPtr->flags &= ~ALLOCED_MASTER; + TkSendVirtualEvent(masterPtr->tkwin, "NoManagedChild", NULL); } } @@ -3512,11 +3512,15 @@ ConfigureSlaves( /* * If we have emptied this master from slaves it means we are no longer * handling it and should mark it as free. + * + * Send the event "NoManagedChild" to the master to inform it about there + * being no managed children inside it. */ if (masterPtr->slavePtr == NULL && masterPtr->flags & ALLOCED_MASTER) { TkFreeGeometryMaster(masterPtr->tkwin, "grid"); masterPtr->flags &= ~ALLOCED_MASTER; + TkSendVirtualEvent(masterPtr->tkwin, "NoManagedChild", NULL); } return TCL_OK; |