More info on this problem (possible solution below): Things happen as follows...
Calling XtSetValues to set XmNtopPosition gets to RowColumn's constraint_set_values where it correctly shuffles the MGR_Children and then calls _XmRCAdjustSize which redoes the layout and calls _XmRCAdjustSize which does the geometry requests to move the widgets around. This much of it works. However... Once it's done with all that, XtSetValues detects that the child we moved has changed its w->core.y and then fakes the child into thinking it's still in its old location and makes another geometry request to move it to where it really already is. The RowColumn gets involved and its geometry_manager gets called again. This time, when XmRCAdjustSize is called, the child we moved (and who's core.y has been faked to its old location) is treated as the "instigator". The layout is redone, but since instig is not NULL this time, _XmRCSetKidGeo is NOT called and the core.y that Xt faked to the old location stays there. If we then try to repeat this process to move the child back or to move another child, we've got one child which needs to be moved but thinks it's already there so it doesn't bother moving it. The following appear to fix it, but I don't know if it breaks anything else (doesn't seem to) In rcutils.c, line 1706. Take out the if (instg == NULL) and just do those two lines anyway. _XmRCSetKidGeo() appears to be designed to handle this very case if passed a non-null "instig" ----- Original Message ----- From: "Dave Williss" <[EMAIL PROTECTED]> To: "LessTif Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, June 17, 2004 5:25 PM Subject: [Lesstif] New problem: XmNpostionIndex > One of our documenters found a new problem. > We have a dialog with an XmRowColumn in it. This has several > forms, one for each "layer" in a set of images. When the user picks > an option off a menu to "raise" or "lower" a layer, it sets the > XmNpositionIndex of that layer's form. > > In Lesstif, shuffling the children around this way causes > some weird effects and doesn't seem to even be consistent. > Sometimes I can "raise" the lower form and it may or may > not actually change the other. > > in RowColumn.c, constraint_set_values(), RCC_PositionIndex has > changed. It eventually calls _XmRCAdjustSize(). This redoes > the layout and calls _XmRCSetKidGeo to move the forms around. > However in XmRCSetKidGeo, one or more of the forms seems > to think it's already been moved even though it hasn't. > It seems to have this idea as early as DoLayoutVT, where the > form that was on the bottom seems to think it's already at 0,0 > > I'm still tracing into this one, but it will have to wait until tomorrow > now. > > BTW, what time zone are you guys in? I'm in the Central US > time zone. > > -- Dave Williss > ------ > Meddle not in the affairs of dragons, > for you are crunchy and taste good with catsup > _______________________________________________ > Lesstif mailing list > [EMAIL PROTECTED] > https://terror.hungry.com/mailman/listinfo/lesstif _______________________________________________ Lesstif mailing list [EMAIL PROTECTED] https://terror.hungry.com/mailman/listinfo/lesstif
