Path: utzoo!attcan!uunet!tank!ncar!mailrus!cornell!batcomputer!gdykes
From: gdykes@batcomputer.tn.cornell.edu (Gene Dykes)
Newsgroups: comp.windows.x
Subject: XtSetValues / geometry_manager problem
Message-ID: <6365@batcomputer.tn.cornell.edu>
Date: 21 Sep 88 01:48:42 GMT
Distribution: comp
Organization: Theory Center, Cornell U., Ithaca NY
Lines: 32

XtSetValues looks at x,y,width,height of the new widget and
compares them to the values in the current widget.  If different, XtSetValues
calls the geometry manager of the widget's parent.  But, XtSetValues passes
the "current" widget to the geometry manager instead of the "new" widget.
It also passes the old constraint information, not the new.

I have two related problems with this:

1) How is a geometry manager supposed to make a good layout when it is given
Widget and constraint values which point to outdated information?
Is it the case that the geometry manager is supposed to do a layout based
solely on the geometry information of the request argument?
If, for instance, I wanted to do an XtQueryGeometry on the children,  I have to
take care to treat the calling widget differently, because it would give
bogus information to the question "What is your preferred geometry?".  Is there
a good rationale for passing the old information instead of the new?

2) A GeometryManager may also be affected by certain constraints of a widget.
If one of these constraints is changed by XtSetValues, there is no mechanism
for telling XtSetValues that the geometry manager needs to be called.
Admittedly, this relayout could be done when the notification is made in
ConstraintSetValues, but this seems clumsy to me and this will result in the
layout being done yet another time when the Geometry Manager is called because
of the new widget geometry.

What I would like is for XtSetValues to pass the correct (new) information to
the geometry manager and to allow the ConstraintSetValues procedure to be able
to return a code that means, "The Geometry Will Change", so that XtSetValues
will call the geometry manager even if x,y,width,height haven't changed.

-- 
Gene Dykes, gdykes@tcgould.tn.cornell.edu