[comp.windows.x] Geometry Management Question

bjoyce@coherent.com (Bob Joyce) (10/12/88)

Suppose that a child widget C makes a geometry request to its parent P.  P
is unwilling to satisfy the full request as stated. P is willing to 
accept part of the request if its own geometry can change.

At this point, P's geometry manager cannot return XtGeometryAlmost, because it
has to guarantee that it can accept the compromise it specifies.  P can't
make this guarantee until it knows whether its own geometry can change.

So P makes a geometry request to its own parent.  Assume the response is 
XtGeometryYes.  What should P's geometry manager do?  

Suppose it returns XtGeometryAlmost.  If C does not accept the compromise,
then P has changed its own geometry, and possibly the geometry of all of P's
parents, to no end.  Further, P may not learn of C's refusal, so this
new geometry may remain.

Alternatively, P's geometry manager could modify C's geometry and return
XtGeometryDone.  Then, the Intrinsics routine XtMakeGeometryRequest() returns
XtGeometryYes, suggesting that C's request was granted in full.  But P only
granted part of the geometry request.

Either approach seems less than desirable.  What is recommended?


Bob Joyce  Coherent Thought Inc  Palo Alto, CA
  UUCP:	...!{ames,sun,uunet}!coherent!bjoyce	Domain: bjoyce@coherent.com
  Internet: coherent!bjoyce@ames.arpa or coherent!bjoyce@uunet.uu.net
  U.S. Mail: Coherent Thought, 3350 W. Bayshore Rd #205, Palo Alto, CA 94303
  Phone:    (415) 493-8805

RWS@zermatt.lcs.mit.EDU (Robert Scheifler) (10/12/88)

    Date: 11 Oct 88 22:53:37 GMT
    From: coherent!bjoyce@AMES.ARC.NASA.GOV  (Bob Joyce)

    Either approach seems less than desirable.  What is recommended?

A change in the spec.  The final Xt spec (available in R3) contains an
XtCWQueryOnly request_mode, and explains how to use it to solve the
problem you pose.