On Tue, 13 Sep 2005, Alexander Pohoyda wrote:
The original problem is that when I use my experimental Hyperbolic
Tree widget as a child of Viewport widget, the size of unrealized
Viewport widget is not yet set and thus I cannot find out how much
space I have available for layout.
I have the following patch in mind and it solves the problem for me.
Does it make sense or should I look for another solution?
Index: Viewport.c
===================================================================
RCS file: /cvs/xc/lib/Xaw/Viewport.c,v
retrieving revision 1.11
diff -u -r1.11 Viewport.c
--- Viewport.c 14 Dec 2001 19:54:45 -0000 1.11
+++ Viewport.c 13 Sep 2005 18:18:07 -0000
@@ -292,6 +292,12 @@
w->form.default_spacing = 0; /* Reset the default spacing to 0 pixels */
/*
+ * Get the size from the parent
+ */
+ XtWidth(w) = XtWidth(XtParent(w));
+ XtHeight(w) = XtHeight(XtParent(w));
+
+ /*
* Initialize all widget pointers to NULL
*/
w->viewport.child = NULL;
That looks fine to me.
I do have one request though. If you are to contune with more Xaw work,
please ensure you do not adversely affect Xaw6.
Thanks.
Marc.
+----------------------------------+-----------------------------------+
| Marc Aurele La France | work: 1-780-492-9310 |
| Academic Information and | fax: 1-780-492-1729 |
| Communications Technologies | email: [EMAIL PROTECTED] |
| 352 General Services Building +-----------------------------------+
| University of Alberta | |
| Edmonton, Alberta | Standard disclaimers apply |
| T6G 2H1 | |
| CANADA | |
+----------------------------------+-----------------------------------+
XFree86 developer and VP. ATI driver and X server internals.
_______________________________________________
Devel mailing list
Devel@XFree86.Org
http://XFree86.Org/mailman/listinfo/devel