Import Tk 8.6.10
This commit is contained in:
@@ -1913,7 +1913,7 @@ ResolveConstraints(
|
||||
GridLayout *layoutPtr; /* Temporary layout structure. */
|
||||
int requiredSize; /* The natural size of the grid (pixels).
|
||||
* This is the minimum size needed to
|
||||
* accomodate all of the slaves at their
|
||||
* accommodate all of the slaves at their
|
||||
* requested sizes. */
|
||||
int offset; /* The pixel offset of the right edge of the
|
||||
* current slot from the beginning of the
|
||||
@@ -2486,7 +2486,7 @@ GetGrid(
|
||||
* Side effects:
|
||||
* The width and height arguments are filled in the master data
|
||||
* structure. Additional space is allocated for the constraints to
|
||||
* accomodate the offsets.
|
||||
* accommodate the offsets.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2938,6 +2938,7 @@ ConfigureSlaves(
|
||||
Gridder *masterPtr = NULL;
|
||||
Gridder *slavePtr;
|
||||
Tk_Window other, slave, parent, ancestor;
|
||||
TkWindow *master;
|
||||
int i, j, tmp;
|
||||
int numWindows;
|
||||
int width;
|
||||
@@ -3352,17 +3353,23 @@ ConfigureSlaves(
|
||||
}
|
||||
|
||||
/*
|
||||
* Try to make sure our master isn't managed by us.
|
||||
* Check for management loops.
|
||||
*/
|
||||
|
||||
if (masterPtr->masterPtr == slavePtr) {
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
for (master = (TkWindow *)masterPtr->tkwin; master != NULL;
|
||||
master = (TkWindow *)TkGetGeomMaster(master)) {
|
||||
if (master == (TkWindow *)slave) {
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"can't put %s inside %s, would cause management loop",
|
||||
Tcl_GetString(objv[j]), Tk_PathName(masterPtr->tkwin)));
|
||||
Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "LOOP", NULL);
|
||||
Unlink(slavePtr);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_GetString(objv[j]), Tk_PathName(masterPtr->tkwin)));
|
||||
Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "LOOP", NULL);
|
||||
Unlink(slavePtr);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
}
|
||||
if (masterPtr->tkwin != Tk_Parent(slave)) {
|
||||
((TkWindow *)slave)->maintainerPtr = (TkWindow *)masterPtr->tkwin;
|
||||
}
|
||||
|
||||
Tk_ManageGeometry(slave, &gridMgrType, slavePtr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user