I have a fix to XmFrame's geometry_manager but I'm not sure of the
"correctness" of the way I did it. I've attached the diff, but would
appreciate it if somebody else would check to see if what I did is
legitimate.
Frame.c, around line 699 does the following check...
if ((wants.request_mode & (CWWidth | CWHeight)) == (CWWidth | CWHeight) &&
reply->width == wants.width && reply->height == wants.height)
If this is true, it configures the children and returns XtGeometryYes
But if the caller only requested a change in one direction, and we were
able to accept it, it falls down into the section that returns
XtGeometryAlmost and returns a reply with no bits set in the
request_mode. If it's going to return Almost, shouldn't it leave
the bits set that it would accept and only clear the ones that
it couldn't accept? That's what Form does.
Anyway, my "solution" (which I have some doubts about) was
to change the code at line 699 to...
/* Slight change of logic here. If the caller only requested a change in
one direction and we could grant it, we should. The previous version
would only return GeometryYes if the caller asked to change both sizes.
--dwilliss 27-Aug-04 */
if (((wants.request_mode & CWWidth) == 0 || reply->width == wants.width) &&
((wants.request_mode & CWHeight) == 0 || reply->height == wants.height))
Although maybe it would be better to use logic similar to form.c,
starting at line 3183. Count "ask" and "good" and accept the
request if the two match.
Oh, and there's another fix which is trivial. Frame.c, line 606...
if (((request->request_mode & CWWidth) && request->width == 0) ||
((request->request_mode & CWWidth) && request->width == 0))
One of those should probably be checking the height? :-)
-- Dave Williss
------
Meddle not in the affairs of dragons,
for you are crunchy and taste good with catsup
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Lesstif-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lesstif-discuss